diff gen/statements.cpp @ 1529:ad7f2f1862d6

Adjust LDC to work with the LLVMContext LLVM changes. This means we now require a fairly new LLVM revision. I use 75234.
author Christian Kamm <kamm incasoftware de>
date Fri, 10 Jul 2009 21:30:02 +0200
parents e1e93343fc11
children 8ca25bd765a3
line wrap: on
line diff
--- a/gen/statements.cpp	Thu Jul 09 21:13:19 2009 +0100
+++ b/gen/statements.cpp	Fri Jul 10 21:30:02 2009 +0200
@@ -818,7 +818,7 @@
         const LLType* elemTy = DtoType(condition->type);
         const llvm::ArrayType* arrTy = llvm::ArrayType::get(elemTy, inits.size());
         LLConstant* arrInit = llvm::ConstantArray::get(arrTy, inits);
-        llvm::GlobalVariable* arr = new llvm::GlobalVariable(arrTy, true, llvm::GlobalValue::InternalLinkage, arrInit, ".string_switch_table_data", gIR->module);
+        llvm::GlobalVariable* arr = new llvm::GlobalVariable(*gIR->module, arrTy, true, llvm::GlobalValue::InternalLinkage, arrInit, ".string_switch_table_data");
 
         const LLType* elemPtrTy = getPtrToType(elemTy);
         LLConstant* arrPtr = llvm::ConstantExpr::getBitCast(arr, elemPtrTy);
@@ -1380,7 +1380,7 @@
 static LLConstant* generate_unique_critical_section()
 {
     const LLType* Mty = DtoMutexType();
-    return new llvm::GlobalVariable(Mty, false, llvm::GlobalValue::InternalLinkage, LLConstant::getNullValue(Mty), ".uniqueCS", gIR->module);
+    return new llvm::GlobalVariable(*gIR->module, Mty, false, llvm::GlobalValue::InternalLinkage, LLConstant::getNullValue(Mty), ".uniqueCS");
 }
 
 void SynchronizedStatement::toIR(IRState* p)