diff options
Diffstat (limited to 'lib/CodeGen')
-rw-r--r-- | lib/CodeGen/DwarfEHPrepare.cpp | 2 | ||||
-rw-r--r-- | lib/CodeGen/IntrinsicLowering.cpp | 16 | ||||
-rw-r--r-- | lib/CodeGen/PseudoSourceValue.cpp | 2 | ||||
-rw-r--r-- | lib/CodeGen/ShadowStackGC.cpp | 2 | ||||
-rw-r--r-- | lib/CodeGen/SjLjEHPrepare.cpp | 8 |
5 files changed, 15 insertions, 15 deletions
diff --git a/lib/CodeGen/DwarfEHPrepare.cpp b/lib/CodeGen/DwarfEHPrepare.cpp index 0ae7b35cc3..72b3f92d32 100644 --- a/lib/CodeGen/DwarfEHPrepare.cpp +++ b/lib/CodeGen/DwarfEHPrepare.cpp @@ -236,7 +236,7 @@ bool DwarfEHPrepare::LowerUnwinds() { if (!RewindFunction) { LLVMContext &Ctx = UnwindInsts[0]->getContext(); std::vector<const Type*> - Params(1, PointerType::getUnqual(Type::getInt8Ty(Ctx))); + Params(1, Type::getInt8PtrTy(Ctx)); FunctionType *FTy = FunctionType::get(Type::getVoidTy(Ctx), Params, false); const char *RewindName = TLI->getLibcallName(RTLIB::UNWIND_RESUME); diff --git a/lib/CodeGen/IntrinsicLowering.cpp b/lib/CodeGen/IntrinsicLowering.cpp index e3bbdb26ea..9336b973c0 100644 --- a/lib/CodeGen/IntrinsicLowering.cpp +++ b/lib/CodeGen/IntrinsicLowering.cpp @@ -103,22 +103,22 @@ void IntrinsicLowering::AddPrototypes(Module &M) { break; case Intrinsic::memcpy: M.getOrInsertFunction("memcpy", - PointerType::getUnqual(Type::getInt8Ty(Context)), - PointerType::getUnqual(Type::getInt8Ty(Context)), - PointerType::getUnqual(Type::getInt8Ty(Context)), + Type::getInt8PtrTy(Context), + Type::getInt8PtrTy(Context), + Type::getInt8PtrTy(Context), TD.getIntPtrType(Context), (Type *)0); break; case Intrinsic::memmove: M.getOrInsertFunction("memmove", - PointerType::getUnqual(Type::getInt8Ty(Context)), - PointerType::getUnqual(Type::getInt8Ty(Context)), - PointerType::getUnqual(Type::getInt8Ty(Context)), + Type::getInt8PtrTy(Context), + Type::getInt8PtrTy(Context), + Type::getInt8PtrTy(Context), TD.getIntPtrType(Context), (Type *)0); break; case Intrinsic::memset: M.getOrInsertFunction("memset", - PointerType::getUnqual(Type::getInt8Ty(Context)), - PointerType::getUnqual(Type::getInt8Ty(Context)), + Type::getInt8PtrTy(Context), + Type::getInt8PtrTy(Context), Type::getInt32Ty(M.getContext()), TD.getIntPtrType(Context), (Type *)0); break; diff --git a/lib/CodeGen/PseudoSourceValue.cpp b/lib/CodeGen/PseudoSourceValue.cpp index 3728b7fe44..00c5d46d21 100644 --- a/lib/CodeGen/PseudoSourceValue.cpp +++ b/lib/CodeGen/PseudoSourceValue.cpp @@ -44,7 +44,7 @@ static const char *const PSVNames[] = { // static. For now, we can safely use the global context for the time being to // squeak by. PseudoSourceValue::PseudoSourceValue() : - Value(PointerType::getUnqual(Type::getInt8Ty(getGlobalContext())), + Value(Type::getInt8PtrTy(getGlobalContext()), PseudoSourceValueVal) {} void PseudoSourceValue::printCustom(raw_ostream &O) const { diff --git a/lib/CodeGen/ShadowStackGC.cpp b/lib/CodeGen/ShadowStackGC.cpp index 541ab9a417..25a499b889 100644 --- a/lib/CodeGen/ShadowStackGC.cpp +++ b/lib/CodeGen/ShadowStackGC.cpp @@ -189,7 +189,7 @@ ShadowStackGC::ShadowStackGC() : Head(0), StackEntryTy(0) { Constant *ShadowStackGC::GetFrameMap(Function &F) { // doInitialization creates the abstract type of this value. - Type *VoidPtr = PointerType::getUnqual(Type::getInt8Ty(F.getContext())); + const Type *VoidPtr = Type::getInt8PtrTy(F.getContext()); // Truncate the ShadowStackDescriptor if some metadata is null. unsigned NumMeta = 0; diff --git a/lib/CodeGen/SjLjEHPrepare.cpp b/lib/CodeGen/SjLjEHPrepare.cpp index 38996ff6cd..04bc6cf892 100644 --- a/lib/CodeGen/SjLjEHPrepare.cpp +++ b/lib/CodeGen/SjLjEHPrepare.cpp @@ -88,7 +88,7 @@ bool SjLjEHPass::doInitialization(Module &M) { // Build the function context structure. // builtin_setjmp uses a five word jbuf const Type *VoidPtrTy = - PointerType::getUnqual(Type::getInt8Ty(M.getContext())); + Type::getInt8PtrTy(M.getContext()); const Type *Int32Ty = Type::getInt32Ty(M.getContext()); FunctionContextTy = StructType::get(M.getContext(), @@ -378,7 +378,7 @@ bool SjLjEHPass::insertSjLjEHSupport(Function &F) { // the instruction hasn't already been removed. if (!I->getParent()) continue; Value *Val = new LoadInst(ExceptionAddr, "exception", true, I); - Type *Ty = PointerType::getUnqual(Type::getInt8Ty(F.getContext())); + const Type *Ty = Type::getInt8PtrTy(F.getContext()); Val = CastInst::Create(Instruction::IntToPtr, Val, Ty, "", I); I->replaceAllUsesWith(Val); @@ -455,8 +455,8 @@ bool SjLjEHPass::insertSjLjEHSupport(Function &F) { // Call the setjmp instrinsic. It fills in the rest of the jmpbuf Value *SetjmpArg = CastInst::Create(Instruction::BitCast, FieldPtr, - Type::getInt8Ty(F.getContext())->getPointerTo(), "", - EntryBB->getTerminator()); + Type::getInt8PtrTy(F.getContext()), "", + EntryBB->getTerminator()); Value *DispatchVal = CallInst::Create(BuiltinSetjmpFn, SetjmpArg, "dispatch", EntryBB->getTerminator()); |