aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGCXX.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/CodeGen/CGCXX.cpp')
-rw-r--r--lib/CodeGen/CGCXX.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/CodeGen/CGCXX.cpp b/lib/CodeGen/CGCXX.cpp
index d6173a0ec1..f80956b93f 100644
--- a/lib/CodeGen/CGCXX.cpp
+++ b/lib/CodeGen/CGCXX.cpp
@@ -45,7 +45,7 @@ CodeGenFunction::GenerateStaticCXXBlockVarDeclInit(const VarDecl &D,
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 @@ llvm::Value *CodeGenFunction::AddressCXXOfBaseClass(llvm::Value *BaseValue,
// 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 @@ llvm::Value *CodeGenFunction::AddressCXXOfBaseClass(llvm::Value *BaseValue,
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;
}