summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Utils/LowerInvoke.cpp
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2009-10-06 15:40:36 +0000
committerDuncan Sands <baldrick@free.fr>2009-10-06 15:40:36 +0000
commit9ed7b16bf33d191c4f58f41b128aded092cc4ea0 (patch)
tree5a1196d794ebba33ff7470d5b0b8abfa948a0e04 /llvm/lib/Transforms/Utils/LowerInvoke.cpp
parentfa21fe7c3d40396ab5c37e087e8b8d02167aee99 (diff)
downloadbcm5719-llvm-9ed7b16bf33d191c4f58f41b128aded092cc4ea0.tar.gz
bcm5719-llvm-9ed7b16bf33d191c4f58f41b128aded092cc4ea0.zip
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. llvm-svn: 83379
Diffstat (limited to 'llvm/lib/Transforms/Utils/LowerInvoke.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/LowerInvoke.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Utils/LowerInvoke.cpp b/llvm/lib/Transforms/Utils/LowerInvoke.cpp
index 4ecf6d7ba26..9a3de264924 100644
--- a/llvm/lib/Transforms/Utils/LowerInvoke.cpp
+++ b/llvm/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);
OpenPOWER on IntegriCloud