diff gen/statements.cpp @ 1560:1d5c3354b3c2

getNullValue is in Constant again Requires LLVM >= r77721
author Benjamin Kramer <benny.kra@gmail.com>
date Fri, 31 Jul 2009 23:01:29 +0200
parents d6e8d5db259f
children 755abafbf25d
line wrap: on
line diff
--- a/gen/statements.cpp	Fri Jul 31 19:11:07 2009 +0200
+++ b/gen/statements.cpp	Fri Jul 31 23:01:29 2009 +0200
@@ -112,7 +112,7 @@
                 // and return 0 instead
                 // if we're not in main, just bitcast
                 if (p->topfunc() == p->mainFunc)
-                    v = gIR->context().getNullValue(p->mainFunc->getReturnType());
+                    v = LLConstant::getNullValue(p->mainFunc->getReturnType());
                 else
                     v = gIR->ir->CreateBitCast(v, p->topfunc()->getReturnType(), "tmp");
 
@@ -1378,7 +1378,7 @@
 static LLConstant* generate_unique_critical_section()
 {
     const LLType* Mty = DtoMutexType();
-    return new llvm::GlobalVariable(*gIR->module, Mty, false, llvm::GlobalValue::InternalLinkage, gIR->context().getNullValue(Mty), ".uniqueCS");
+    return new llvm::GlobalVariable(*gIR->module, Mty, false, llvm::GlobalValue::InternalLinkage, LLConstant::getNullValue(Mty), ".uniqueCS");
 }
 
 void SynchronizedStatement::toIR(IRState* p)