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/IPO/LowerSetJmp.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/IPO/LowerSetJmp.cpp')
-rw-r--r-- | lib/Transforms/IPO/LowerSetJmp.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Transforms/IPO/LowerSetJmp.cpp b/lib/Transforms/IPO/LowerSetJmp.cpp index 5dff47aa81..55194b34cf 100644 --- a/lib/Transforms/IPO/LowerSetJmp.cpp +++ b/lib/Transforms/IPO/LowerSetJmp.cpp @@ -201,7 +201,7 @@ bool LowerSetJmp::runOnModule(Module& M) { // This function is always successful, unless it isn't. bool LowerSetJmp::doInitialization(Module& M) { - const Type *SBPTy = PointerType::getUnqual(Type::getInt8Ty(M.getContext())); + const Type *SBPTy = Type::getInt8PtrTy(M.getContext()); const Type *SBPPTy = PointerType::getUnqual(SBPTy); // N.B. See llvm/runtime/GCCLibraries/libexception/SJLJ-Exception.h for @@ -266,7 +266,7 @@ bool LowerSetJmp::IsTransformableFunction(const std::string& Name) { void LowerSetJmp::TransformLongJmpCall(CallInst* Inst) { const Type* SBPTy = - PointerType::getUnqual(Type::getInt8Ty(Inst->getContext())); + Type::getInt8PtrTy(Inst->getContext()); // Create the call to "__llvm_sjljeh_throw_longjmp". This takes the // same parameters as "longjmp", except that the buffer is cast to a @@ -319,7 +319,7 @@ AllocaInst* LowerSetJmp::GetSetJmpMap(Function* Func) // Fill in the alloca and call to initialize the SJ map. const Type *SBPTy = - PointerType::getUnqual(Type::getInt8Ty(Func->getContext())); + Type::getInt8PtrTy(Func->getContext()); AllocaInst* Map = new AllocaInst(SBPTy, 0, "SJMap", Inst); CallInst::Create(InitSJMap, Map, "", Inst); return SJMap[Func] = Map; @@ -389,7 +389,7 @@ void LowerSetJmp::TransformSetJmpCall(CallInst* Inst) // Add this setjmp to the setjmp map. const Type* SBPTy = - PointerType::getUnqual(Type::getInt8Ty(Inst->getContext())); + Type::getInt8PtrTy(Inst->getContext()); CastInst* BufPtr = new BitCastInst(Inst->getOperand(1), SBPTy, "SBJmpBuf", Inst); std::vector<Value*> Args = |