aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2009-07-13 04:10:07 +0000
committerOwen Anderson <resistor@mac.com>2009-07-13 04:10:07 +0000
commit69243825cb5c91ec7207256aa57ae327cfaf8cb2 (patch)
tree320811e1011cf872fe0196533f1e3cdbf125b8a3 /lib/CodeGen/CodeGenModule.cpp
parentce7b38c4f1ea9c51e2f46a82e3f57456b74269d5 (diff)
Update for LLVM API change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75446 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenModule.cpp')
-rw-r--r--lib/CodeGen/CodeGenModule.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/CodeGen/CodeGenModule.cpp b/lib/CodeGen/CodeGenModule.cpp
index 041480f76c..b516da9a72 100644
--- a/lib/CodeGen/CodeGenModule.cpp
+++ b/lib/CodeGen/CodeGenModule.cpp
@@ -804,7 +804,7 @@ void CodeGenModule::EmitGlobalVarDefinition(const VarDecl *D) {
// exists. A use may still exists, however, so we still may need
// to do a RAUW.
assert(!ASTTy->isIncompleteType() && "Unexpected incomplete type");
- Init = llvm::Constant::getNullValue(getTypes().ConvertTypeForMem(ASTTy));
+ Init = getLLVMContext().getNullValue(getTypes().ConvertTypeForMem(ASTTy));
} else {
Init = EmitConstantExpr(D->getInit(), D->getType());
if (!Init) {
@@ -1184,7 +1184,7 @@ static void appendFieldAndPadding(CodeGenModule &CGM,
// Append padding
for (int i = StructFieldNo + 1; i < NextStructFieldNo; i++) {
llvm::Constant *C =
- llvm::Constant::getNullValue(STy->getElementType(StructFieldNo + 1));
+ CGM.getLLVMContext().getNullValue(STy->getElementType(StructFieldNo + 1));
Fields.push_back(C);
}
@@ -1232,7 +1232,7 @@ GetAddrOfConstantCFString(const StringLiteral *Literal) {
if (llvm::Constant *C = Entry.getValue())
return C;
- llvm::Constant *Zero = llvm::Constant::getNullValue(llvm::Type::Int32Ty);
+ llvm::Constant *Zero = getLLVMContext().getNullValue(llvm::Type::Int32Ty);
llvm::Constant *Zeros[] = { Zero, Zero };
if (!CFConstantStringClassRef) {