Mercurial > projects > ldc
diff gen/toobj.cpp @ 1534:8ca25bd765a3
Build fix for the latest LLVMContext changes (LLVM r75445)
This shouldn't break the build with older LLVM revs. We include
LLVMContext.h in gen/llvm.h now to make the transition a little bit
easier.
author | Benjamin Kramer <benny.kra@gmail.com> |
---|---|
date | Mon, 13 Jul 2009 12:17:58 +0200 |
parents | c88b16d4a13c |
children | 61f12f4651b5 |
line wrap: on
line diff
--- a/gen/toobj.cpp Sat Jul 11 14:19:21 2009 +0200 +++ b/gen/toobj.cpp Mon Jul 13 12:17:58 2009 +0200 @@ -14,7 +14,6 @@ #include "gen/llvm-version.h" #include "llvm/Analysis/Verifier.h" #include "llvm/Bitcode/ReaderWriter.h" -#include "llvm/LLVMContext.h" #include "llvm/Module.h" #include "llvm/ModuleProvider.h" #include "llvm/PassManager.h" @@ -555,7 +554,7 @@ // provide the default initializer const LLStructType* modulerefTy = DtoModuleReferenceType(); std::vector<LLConstant*> mrefvalues; - mrefvalues.push_back(LLConstant::getNullValue(modulerefTy->getContainedType(0))); + mrefvalues.push_back(llvm::getGlobalContext().getNullValue(modulerefTy->getContainedType(0))); mrefvalues.push_back(llvm::ConstantExpr::getBitCast(moduleinfo, modulerefTy->getContainedType(1))); LLConstant* thismrefinit = LLConstantStruct::get(modulerefTy, mrefvalues);