diff options
author | Owen Anderson <resistor@mac.com> | 2009-07-29 22:16:19 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2009-07-29 22:16:19 +0000 |
commit | 96e0fc726c6fe7538522c60743705d5e696b40af (patch) | |
tree | ece7063f7ecc38f4d96b803d5457c7f762756bc1 /lib/CodeGen/CGCXX.cpp | |
parent | 6217b80b7a1379b74cced1c076338262c3c980b3 (diff) |
Update for LLVM API change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77514 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGCXX.cpp')
-rw-r--r-- | lib/CodeGen/CGCXX.cpp | 6 |
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; } |