diff options
author | James Y Knight <jyknight@google.com> | 2019-02-01 20:44:24 +0000 |
---|---|---|
committer | James Y Knight <jyknight@google.com> | 2019-02-01 20:44:24 +0000 |
commit | 14359ef1b6a0610ac91df5f5a91c88a0b51c187c (patch) | |
tree | 53b7628ce6ecba998379d0d19f875bc9dad3b69a /llvm/lib/CodeGen/SjLjEHPrepare.cpp | |
parent | d9e85a0861b7e9320c34547a2ad7f49c504a9381 (diff) | |
download | bcm5719-llvm-14359ef1b6a0610ac91df5f5a91c88a0b51c187c.tar.gz bcm5719-llvm-14359ef1b6a0610ac91df5f5a91c88a0b51c187c.zip |
[opaque pointer types] Pass value type to LoadInst creation.
This cleans up all LoadInst creation in LLVM to explicitly pass the
value type rather than deriving it from the pointer's element-type.
Differential Revision: https://reviews.llvm.org/D57172
llvm-svn: 352911
Diffstat (limited to 'llvm/lib/CodeGen/SjLjEHPrepare.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SjLjEHPrepare.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/SjLjEHPrepare.cpp b/llvm/lib/CodeGen/SjLjEHPrepare.cpp index 94a1ac55fd2..23e5ce0acae 100644 --- a/llvm/lib/CodeGen/SjLjEHPrepare.cpp +++ b/llvm/lib/CodeGen/SjLjEHPrepare.cpp @@ -189,14 +189,16 @@ Value *SjLjEHPrepare::setupFunctionContext(Function &F, Builder.CreateConstGEP2_32(FunctionContextTy, FuncCtx, 0, 2, "__data"); // The exception values come back in context->__data[0]. + Type *Int32Ty = Type::getInt32Ty(F.getContext()); Value *ExceptionAddr = Builder.CreateConstGEP2_32(doubleUnderDataTy, FCData, 0, 0, "exception_gep"); - Value *ExnVal = Builder.CreateLoad(ExceptionAddr, true, "exn_val"); + Value *ExnVal = Builder.CreateLoad(Int32Ty, ExceptionAddr, true, "exn_val"); ExnVal = Builder.CreateIntToPtr(ExnVal, Builder.getInt8PtrTy()); Value *SelectorAddr = Builder.CreateConstGEP2_32(doubleUnderDataTy, FCData, 0, 1, "exn_selector_gep"); - Value *SelVal = Builder.CreateLoad(SelectorAddr, true, "exn_selector_val"); + Value *SelVal = + Builder.CreateLoad(Int32Ty, SelectorAddr, true, "exn_selector_val"); substituteLPadValues(LPI, ExnVal, SelVal); } |