diff options
Diffstat (limited to 'llvm/lib/Transforms/IPO')
-rw-r--r-- | llvm/lib/Transforms/IPO/ExtractGV.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/Transforms/IPO/LowerSetJmp.cpp | 8 | ||||
-rw-r--r-- | llvm/lib/Transforms/IPO/RaiseAllocations.cpp | 4 |
3 files changed, 7 insertions, 7 deletions
diff --git a/llvm/lib/Transforms/IPO/ExtractGV.cpp b/llvm/lib/Transforms/IPO/ExtractGV.cpp index 3dd3a80a15b..191100c2e24 100644 --- a/llvm/lib/Transforms/IPO/ExtractGV.cpp +++ b/llvm/lib/Transforms/IPO/ExtractGV.cpp @@ -102,7 +102,7 @@ namespace { { std::vector<Constant *> AUGs; const Type *SBP= - PointerType::getUnqual(Type::getInt8Ty(M.getContext())); + Type::getInt8PtrTy(M.getContext()); for (std::vector<GlobalValue*>::iterator GI = Named.begin(), GE = Named.end(); GI != GE; ++GI) { (*GI)->setLinkage(GlobalValue::ExternalLinkage); diff --git a/llvm/lib/Transforms/IPO/LowerSetJmp.cpp b/llvm/lib/Transforms/IPO/LowerSetJmp.cpp index 5dff47aa81e..55194b34cf2 100644 --- a/llvm/lib/Transforms/IPO/LowerSetJmp.cpp +++ b/llvm/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 = diff --git a/llvm/lib/Transforms/IPO/RaiseAllocations.cpp b/llvm/lib/Transforms/IPO/RaiseAllocations.cpp index 7b4ad276941..4c1f26d50d3 100644 --- a/llvm/lib/Transforms/IPO/RaiseAllocations.cpp +++ b/llvm/lib/Transforms/IPO/RaiseAllocations.cpp @@ -77,7 +77,7 @@ void RaiseAllocations::doInitialization(Module &M) { // Get the expected prototype for malloc const FunctionType *Malloc1Type = - FunctionType::get(PointerType::getUnqual(Type::getInt8Ty(M.getContext())), + FunctionType::get(Type::getInt8PtrTy(M.getContext()), std::vector<const Type*>(1, Type::getInt64Ty(M.getContext())), false); @@ -229,7 +229,7 @@ bool RaiseAllocations::runOnModule(Module &M) { Value *Source = *CS.arg_begin(); if (!isa<PointerType>(Source->getType())) Source = new IntToPtrInst(Source, - PointerType::getUnqual(Type::getInt8Ty(M.getContext())), + Type::getInt8PtrTy(M.getContext()), "FreePtrCast", I); new FreeInst(Source, I); |