Panic if can't make a JIT while creating a context
This commit is contained in:
parent
840a7c565c
commit
6eaba7dbe8
|
@ -224,14 +224,10 @@ public:
|
||||||
// Make serene.user which is the defult NS available on the
|
// Make serene.user which is the defult NS available on the
|
||||||
// JIT
|
// JIT
|
||||||
auto loc = reader::LocationRange::UnknownLocation(INTERNAL_NS);
|
auto loc = reader::LocationRange::UnknownLocation(INTERNAL_NS);
|
||||||
auto err = ctx->jit->addNS(*ns, loc);
|
if (auto err = ctx->jit->addNS(*ns, loc)) {
|
||||||
|
panic(*ctx, err);
|
||||||
// TODO: Fix this by calling to the diag engine
|
|
||||||
if (err) {
|
|
||||||
llvm::errs() << err << "\n";
|
|
||||||
serene::terminate(*ctx, 1);
|
|
||||||
return nullptr;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return ctx;
|
return ctx;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue