diff options
Diffstat (limited to 'lib/Transforms/Utils')
-rw-r--r-- | lib/Transforms/Utils/InlineFunction.cpp | 2 | ||||
-rw-r--r-- | lib/Transforms/Utils/LowerAllocations.cpp | 4 | ||||
-rw-r--r-- | lib/Transforms/Utils/LowerInvoke.cpp | 6 |
3 files changed, 6 insertions, 6 deletions
diff --git a/lib/Transforms/Utils/InlineFunction.cpp b/lib/Transforms/Utils/InlineFunction.cpp index f9efc34..0d00d69 100644 --- a/lib/Transforms/Utils/InlineFunction.cpp +++ b/lib/Transforms/Utils/InlineFunction.cpp @@ -316,7 +316,7 @@ bool llvm::InlineFunction(CallSite CS, CallGraph *CG, const TargetData *TD, !CalledFunc->onlyReadsMemory()) { const Type *AggTy = cast<PointerType>(I->getType())->getElementType(); const Type *VoidPtrTy = - PointerType::getUnqual(Type::getInt8Ty(Context)); + Type::getInt8PtrTy(Context); // Create the alloca. If we have TargetData, use nice alignment. unsigned Align = 1; diff --git a/lib/Transforms/Utils/LowerAllocations.cpp b/lib/Transforms/Utils/LowerAllocations.cpp index 2df953c..f26d7c1 100644 --- a/lib/Transforms/Utils/LowerAllocations.cpp +++ b/lib/Transforms/Utils/LowerAllocations.cpp @@ -87,7 +87,7 @@ Pass *llvm::createLowerAllocationsPass(bool LowerMallocArgToInteger) { // This function is always successful. // bool LowerAllocations::doInitialization(Module &M) { - const Type *BPTy = PointerType::getUnqual(Type::getInt8Ty(M.getContext())); + const Type *BPTy = Type::getInt8PtrTy(M.getContext()); FreeFunc = M.getOrInsertFunction("free" , Type::getVoidTy(M.getContext()), BPTy, (Type *)0); return true; @@ -123,7 +123,7 @@ bool LowerAllocations::runOnBasicBlock(BasicBlock &BB) { } else if (FreeInst *FI = dyn_cast<FreeInst>(I)) { Value *PtrCast = new BitCastInst(FI->getOperand(0), - PointerType::getUnqual(Type::getInt8Ty(BB.getContext())), "", I); + Type::getInt8PtrTy(BB.getContext()), "", I); // Insert a call to the free function... CallInst::Create(FreeFunc, PtrCast, "", I)->setTailCall(); diff --git a/lib/Transforms/Utils/LowerInvoke.cpp b/lib/Transforms/Utils/LowerInvoke.cpp index 4ecf6d7..9a3de26 100644 --- a/lib/Transforms/Utils/LowerInvoke.cpp +++ b/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); |