diff options
author | Owen Anderson <resistor@mac.com> | 2009-07-31 20:28:54 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2009-07-31 20:28:54 +0000 |
commit | c9c88b4159791c48e486ca94e3743b5979e2b7a6 (patch) | |
tree | 4d85d56ca6aee06dbf8d7e691a73daa53f07e571 /lib/CodeGen/CGCXX.cpp | |
parent | 8c4dc1ffd20a8fe90a90c7f471cd9842b981078e (diff) |
Update for LLVM API change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77722 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGCXX.cpp')
-rw-r--r-- | lib/CodeGen/CGCXX.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/CodeGen/CGCXX.cpp b/lib/CodeGen/CGCXX.cpp index 88d36a2c00..6c0c0d90f1 100644 --- a/lib/CodeGen/CGCXX.cpp +++ b/lib/CodeGen/CGCXX.cpp @@ -41,7 +41,7 @@ CodeGenFunction::GenerateStaticCXXBlockVarDeclInit(const VarDecl &D, llvm::GlobalValue *GuardV = new llvm::GlobalVariable(CGM.getModule(), llvm::Type::Int64Ty, false, GV->getLinkage(), - VMContext.getNullValue(llvm::Type::Int64Ty), + llvm::Constant::getNullValue(llvm::Type::Int64Ty), GuardVName.c_str()); // Load the first byte of the guard variable. @@ -50,7 +50,7 @@ CodeGenFunction::GenerateStaticCXXBlockVarDeclInit(const VarDecl &D, "tmp"); // Compare it against 0. - llvm::Value *nullValue = VMContext.getNullValue(llvm::Type::Int8Ty); + llvm::Value *nullValue = llvm::Constant::getNullValue(llvm::Type::Int8Ty); llvm::Value *ICmp = Builder.CreateICmpEQ(V, nullValue , "tobool"); llvm::BasicBlock *InitBlock = createBasicBlock("init"); @@ -342,7 +342,7 @@ llvm::Value *CodeGenFunction::EmitCXXNewExpr(const CXXNewExpr *E) { llvm::Value *IsNull = Builder.CreateICmpEQ(NewPtr, - VMContext.getNullValue(NewPtr->getType()), + llvm::Constant::getNullValue(NewPtr->getType()), "isnull"); Builder.CreateCondBr(IsNull, NewNull, NewNotNull); @@ -383,7 +383,7 @@ llvm::Value *CodeGenFunction::EmitCXXNewExpr(const CXXNewExpr *E) { llvm::PHINode *PHI = Builder.CreatePHI(NewPtr->getType()); PHI->reserveOperandSpace(2); PHI->addIncoming(NewPtr, NewNotNull); - PHI->addIncoming(VMContext.getNullValue(NewPtr->getType()), NewNull); + PHI->addIncoming(llvm::Constant::getNullValue(NewPtr->getType()), NewNull); NewPtr = PHI; } |