mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 11:13:28 +01: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 llvm-svn: 181802
This commit is contained in:
parent
812ee5bc7c
commit
c2f3b6d475
@ -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…
Reference in New Issue
Block a user