comments
This commit is contained in:
parent
e822235323
commit
e5d50e3e88
2 changed files with 5 additions and 2 deletions
|
|
@ -475,9 +475,10 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
|
|||
},
|
||||
}
|
||||
// Allow RalfJ to sleep soundly knowing that even refactorings that remove
|
||||
// the above error (or silence it under some conditions) will not cause UB
|
||||
// the above error (or silence it under some conditions) will not cause UB.
|
||||
bx.abort();
|
||||
// We've errored, so we don't have to produce working code.
|
||||
// We still have to return an operand but it doesn't matter,
|
||||
// this code is unreachable.
|
||||
let ty = self.monomorphize(&constant.literal.ty);
|
||||
let layout = bx.cx().layout_of(ty);
|
||||
bx.load_operand(PlaceRef::new_sized(
|
||||
|
|
|
|||
|
|
@ -493,6 +493,8 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
|
|||
// With floats that won't always be true,
|
||||
// so we generate a (safe) abort.
|
||||
bx.abort();
|
||||
// We still have to return a place but it doesn't matter,
|
||||
// this code is unreachable.
|
||||
let llval = bx.cx().const_undef(
|
||||
bx.cx().type_ptr_to(bx.cx().backend_type(layout))
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue