llvm: fix lowering of @trap

It needed an unreachable instruction after it.
This commit is contained in:
Andrew Kelley 2023-03-04 14:48:31 -07:00
parent fb04ff45cd
commit 48e72960a4

View File

@ -8261,6 +8261,7 @@ pub const FuncGen = struct {
_ = inst;
const llvm_fn = self.getIntrinsic("llvm.trap", &.{});
_ = self.builder.buildCall(llvm_fn.globalGetValueType(), llvm_fn, undefined, 0, .Cold, .Auto, "");
_ = self.builder.buildUnreachable();
return null;
}