Update for LLVM API change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77514 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CGCXX.cpp b/lib/CodeGen/CGCXX.cpp
index d6173a0..f80956b 100644
--- a/lib/CodeGen/CGCXX.cpp
+++ b/lib/CodeGen/CGCXX.cpp
@@ -45,7 +45,7 @@
GuardVName.c_str());
// Load the first byte of the guard variable.
- const llvm::Type *PtrTy = VMContext.getPointerType(llvm::Type::Int8Ty, 0);
+ const llvm::Type *PtrTy = llvm::PointerType::get(llvm::Type::Int8Ty, 0);
llvm::Value *V = Builder.CreateLoad(Builder.CreateBitCast(GuardV, PtrTy),
"tmp");
@@ -166,7 +166,7 @@
// FIXME. Once type layout is complete, this will probably change.
const ASTRecordLayout &Layout =
getContext().getASTRecordLayout(ClassDecl);
- llvm::Type *I8Ptr = VMContext.getPointerTypeUnqual(llvm::Type::Int8Ty);
+ llvm::Type *I8Ptr = llvm::PointerType::getUnqual(llvm::Type::Int8Ty);
uint64_t Offset = Layout.getBaseClassOffset(BaseClassDecl) / 8;
llvm::Value *OffsetVal =
llvm::ConstantInt::get(
@@ -177,7 +177,7 @@
getContext().getCanonicalType(
getContext().getTypeDeclType(const_cast<CXXRecordDecl*>(BaseClassDecl)));
const llvm::Type *BasePtr = ConvertType(BTy);
- BasePtr = VMContext.getPointerTypeUnqual(BasePtr);
+ BasePtr = llvm::PointerType::getUnqual(BasePtr);
BaseValue = Builder.CreateBitCast(BaseValue, BasePtr);
return BaseValue;
}