aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Transforms/Utils/LowerInvoke.cpp
diff options
context:
space:
mode:
authorChristopher Lamb <christopher.lamb@gmail.com>2007-12-17 01:12:55 +0000
committerChristopher Lamb <christopher.lamb@gmail.com>2007-12-17 01:12:55 +0000
commitbb2f2222b45179d8ddd0c7d481ad9dc068c82b6c (patch)
treeaccb30ee96c29fc9e1021feaa850a435b60f81fc /lib/Transforms/Utils/LowerInvoke.cpp
parentcfe0096362c9823c2164f445b898c4fcfd4831ad (diff)
downloadexternal_llvm-bb2f2222b45179d8ddd0c7d481ad9dc068c82b6c.zip
external_llvm-bb2f2222b45179d8ddd0c7d481ad9dc068c82b6c.tar.gz
external_llvm-bb2f2222b45179d8ddd0c7d481ad9dc068c82b6c.tar.bz2
Change the PointerType api for creating pointer types. The old functionality of PointerType::get() has become PointerType::getUnqual(), which returns a pointer in the generic address space. The new prototype of PointerType::get() requires both a type and an address space.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45082 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Utils/LowerInvoke.cpp')
-rw-r--r--lib/Transforms/Utils/LowerInvoke.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/Transforms/Utils/LowerInvoke.cpp b/lib/Transforms/Utils/LowerInvoke.cpp
index 24b167a..db49b78 100644
--- a/lib/Transforms/Utils/LowerInvoke.cpp
+++ b/lib/Transforms/Utils/LowerInvoke.cpp
@@ -114,7 +114,7 @@ FunctionPass *llvm::createLowerInvokePass(const TargetLowering *TLI) {
// doInitialization - Make sure that there is a prototype for abort in the
// current module.
bool LowerInvoke::doInitialization(Module &M) {
- const Type *VoidPtrTy = PointerType::get(Type::Int8Ty);
+ const Type *VoidPtrTy = PointerType::getUnqual(Type::Int8Ty);
AbortMessage = 0;
if (ExpensiveEHSupport) {
// Insert a type for the linked list of jump buffers.
@@ -126,14 +126,14 @@ bool LowerInvoke::doInitialization(Module &M) {
std::vector<const Type*> Elements;
Elements.push_back(JmpBufTy);
OpaqueType *OT = OpaqueType::get();
- Elements.push_back(PointerType::get(OT));
+ Elements.push_back(PointerType::getUnqual(OT));
PATypeHolder JBLType(StructType::get(Elements));
OT->refineAbstractTypeTo(JBLType.get()); // Complete the cycle.
JBLinkTy = JBLType.get();
M.addTypeName("llvm.sjljeh.jmpbufty", JBLinkTy);
}
- const Type *PtrJBList = PointerType::get(JBLinkTy);
+ const Type *PtrJBList = PointerType::getUnqual(JBLinkTy);
// Now that we've done that, insert the jmpbuf list head global, unless it
// already exists.
@@ -144,9 +144,10 @@ bool LowerInvoke::doInitialization(Module &M) {
"llvm.sjljeh.jblist", &M);
}
SetJmpFn = M.getOrInsertFunction("llvm.setjmp", Type::Int32Ty,
- PointerType::get(JmpBufTy), (Type *)0);
+ PointerType::getUnqual(JmpBufTy),
+ (Type *)0);
LongJmpFn = M.getOrInsertFunction("llvm.longjmp", Type::VoidTy,
- PointerType::get(JmpBufTy),
+ PointerType::getUnqual(JmpBufTy),
Type::Int32Ty, (Type *)0);
}