diff options
author | Duncan Sands <baldrick@free.fr> | 2009-10-06 15:40:36 +0000 |
---|---|---|
committer | Duncan Sands <baldrick@free.fr> | 2009-10-06 15:40:36 +0000 |
commit | ac53a0b272452013124bfc70480aea5e41b60f40 (patch) | |
tree | 13cacd7f4cf35222c87f5021354fd8944756b1e0 /lib/Transforms/Utils/LowerInvoke.cpp | |
parent | 6e214805b1163c0e3cd218963c9e66ea244956b2 (diff) |
Introduce and use convenience methods for getting pointer types
where the element is of a basic builtin type. For example, to get
an i8* use getInt8PtrTy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83379 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Utils/LowerInvoke.cpp')
-rw-r--r-- | lib/Transforms/Utils/LowerInvoke.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Transforms/Utils/LowerInvoke.cpp b/lib/Transforms/Utils/LowerInvoke.cpp index 4ecf6d7ba2..9a3de26492 100644 --- a/lib/Transforms/Utils/LowerInvoke.cpp +++ b/lib/Transforms/Utils/LowerInvoke.cpp @@ -116,7 +116,7 @@ FunctionPass *llvm::createLowerInvokePass(const TargetLowering *TLI) { // current module. bool LowerInvoke::doInitialization(Module &M) { const Type *VoidPtrTy = - PointerType::getUnqual(Type::getInt8Ty(M.getContext())); + Type::getInt8PtrTy(M.getContext()); AbortMessage = 0; if (ExpensiveEHSupport) { // Insert a type for the linked list of jump buffers. @@ -530,7 +530,7 @@ bool LowerInvoke::insertExpensiveEHSupport(Function &F) { "TheJmpBuf", EntryBB->getTerminator()); JmpBufPtr = new BitCastInst(JmpBufPtr, - PointerType::getUnqual(Type::getInt8Ty(F.getContext())), + Type::getInt8PtrTy(F.getContext()), "tmp", EntryBB->getTerminator()); Value *SJRet = CallInst::Create(SetJmpFn, JmpBufPtr, "sjret", EntryBB->getTerminator()); @@ -585,7 +585,7 @@ bool LowerInvoke::insertExpensiveEHSupport(Function &F) { Idx[0] = GetElementPtrInst::Create(BufPtr, Idx.begin(), Idx.end(), "JmpBuf", UnwindBlock); Idx[0] = new BitCastInst(Idx[0], - PointerType::getUnqual(Type::getInt8Ty(F.getContext())), + Type::getInt8PtrTy(F.getContext()), "tmp", UnwindBlock); Idx[1] = ConstantInt::get(Type::getInt32Ty(F.getContext()), 1); CallInst::Create(LongJmpFn, Idx.begin(), Idx.end(), "", UnwindBlock); |