mirror of
https://github.com/RPCS3/llvm.git
synced 2025-02-05 18:17:00 +00:00
Add bitcast to store of personality function.
The personality function is user defined and may have an arbitrary result type. The code assumes always i8*. This results in an assertion failure if a different type is used. A bitcast to i8* is added to prevent this failure. Reviewed by: Renato Golin, Bob Wilson git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181802 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
ed788b6283
commit
e4642bc096
@ -222,7 +222,9 @@ setupFunctionContext(Function &F, ArrayRef<LandingPadInst*> LPads) {
|
||||
PersonalityFn = LPads[0]->getPersonalityFn();
|
||||
Value *PersonalityFieldPtr = Builder.CreateConstGEP2_32(FuncCtx, 0, 3,
|
||||
"pers_fn_gep");
|
||||
Builder.CreateStore(PersonalityFn, PersonalityFieldPtr, /*isVolatile=*/true);
|
||||
Builder.CreateStore(Builder.CreateBitCast(PersonalityFn,
|
||||
Builder.getInt8PtrTy()),
|
||||
PersonalityFieldPtr, /*isVolatile=*/true);
|
||||
|
||||
// LSDA address
|
||||
Value *LSDA = Builder.CreateCall(LSDAAddrFn, "lsda_addr");
|
||||
|
Loading…
x
Reference in New Issue
Block a user