diff options
author | Chris Lattner <sabre@nondot.org> | 2011-07-18 04:54:35 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2011-07-18 04:54:35 +0000 |
commit | db125cfaf57cc83e7dd7453de2d509bc8efd0e5e (patch) | |
tree | a163ac0f83da7be3f9675a122a6144b12418be09 /lib/Transforms/IPO/LowerSetJmp.cpp | |
parent | 4b3d5469fb7c25504fa20dc65640f02d79675d48 (diff) |
land David Blaikie's patch to de-constify Type, with a few tweaks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135375 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/IPO/LowerSetJmp.cpp')
-rw-r--r-- | lib/Transforms/IPO/LowerSetJmp.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/Transforms/IPO/LowerSetJmp.cpp b/lib/Transforms/IPO/LowerSetJmp.cpp index 659476b139..494cee20f2 100644 --- a/lib/Transforms/IPO/LowerSetJmp.cpp +++ b/lib/Transforms/IPO/LowerSetJmp.cpp @@ -199,8 +199,8 @@ bool LowerSetJmp::runOnModule(Module& M) { // This function is always successful, unless it isn't. bool LowerSetJmp::doInitialization(Module& M) { - const Type *SBPTy = Type::getInt8PtrTy(M.getContext()); - const Type *SBPPTy = PointerType::getUnqual(SBPTy); + Type *SBPTy = Type::getInt8PtrTy(M.getContext()); + Type *SBPPTy = PointerType::getUnqual(SBPTy); // N.B. See llvm/runtime/GCCLibraries/libexception/SJLJ-Exception.h for // a description of the following library functions. @@ -258,7 +258,7 @@ bool LowerSetJmp::IsTransformableFunction(StringRef Name) { // throwing the exception for us. void LowerSetJmp::TransformLongJmpCall(CallInst* Inst) { - const Type* SBPTy = Type::getInt8PtrTy(Inst->getContext()); + Type* SBPTy = 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 @@ -308,7 +308,7 @@ AllocaInst* LowerSetJmp::GetSetJmpMap(Function* Func) assert(Inst && "Couldn't find even ONE instruction in entry block!"); // Fill in the alloca and call to initialize the SJ map. - const Type *SBPTy = + Type *SBPTy = Type::getInt8PtrTy(Func->getContext()); AllocaInst* Map = new AllocaInst(SBPTy, 0, "SJMap", Inst); CallInst::Create(InitSJMap, Map, "", Inst); @@ -378,7 +378,7 @@ void LowerSetJmp::TransformSetJmpCall(CallInst* Inst) Function* Func = ABlock->getParent(); // Add this setjmp to the setjmp map. - const Type* SBPTy = + Type* SBPTy = Type::getInt8PtrTy(Inst->getContext()); CastInst* BufPtr = new BitCastInst(Inst->getArgOperand(0), SBPTy, "SBJmpBuf", Inst); |