Mercurial > projects > ldc
diff gen/todebug.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 | ad7f2f1862d6 |
children | 61f12f4651b5 |
line wrap: on
line diff
--- a/gen/todebug.cpp Sat Jul 11 14:19:21 2009 +0200 +++ b/gen/todebug.cpp Mon Jul 13 12:17:58 2009 +0200 @@ -19,7 +19,7 @@ using namespace llvm::dwarf; -#define DBG_NULL ( LLConstant::getNullValue(DBG_TYPE) ) +#define DBG_NULL ( llvm::getGlobalContext().getNullValue(DBG_TYPE) ) #define DBG_TYPE ( getPtrToType(llvm::StructType::get(NULL,NULL)) ) #define DBG_CAST(X) ( llvm::ConstantExpr::getBitCast(X, DBG_TYPE) ) @@ -297,7 +297,7 @@ std::vector<LLConstant*> initvals(11); initvals[0] = DBG_TAG(DW_TAG_structure_type); for (int i = 1; i < initvals.size(); ++i) - initvals[i] = LLConstant::getNullValue(getDwarfCompositeTypeType()->getContainedType(i)); + initvals[i] = llvm::getGlobalContext().getNullValue(getDwarfCompositeTypeType()->getContainedType(i)); gv->setInitializer(LLConstantStruct::get(getDwarfCompositeTypeType(), initvals)); ir->diCompositeType = llvm::DICompositeType(gv);