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
|
||||
// JIT
|
||||
auto loc = reader::LocationRange::UnknownLocation(INTERNAL_NS);
|
||||
auto err = ctx->jit->addNS(*ns, loc);
|
||||
|
||||
// TODO: Fix this by calling to the diag engine
|
||||
if (err) {
|
||||
llvm::errs() << err << "\n";
|
||||
serene::terminate(*ctx, 1);
|
||||
return nullptr;
|
||||
if (auto err = ctx->jit->addNS(*ns, loc)) {
|
||||
panic(*ctx, err);
|
||||
}
|
||||
|
||||
return ctx;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue