Don't use llvm::getGlobalContext() anymore

This commit is contained in:
Benjamin Kramer
2009-07-13 20:16:15 +02:00
parent 331319dab1
commit 0ee2f34611
21 changed files with 59 additions and 48 deletions

View File

@@ -19,7 +19,7 @@
using namespace llvm::dwarf;
#define DBG_NULL ( llvm::getGlobalContext().getNullValue(DBG_TYPE) )
#define DBG_NULL ( gIR->context().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 @@ static llvm::DICompositeType dwarfCompositeType(Type* type, llvm::DICompileUnit
std::vector<LLConstant*> initvals(11);
initvals[0] = DBG_TAG(DW_TAG_structure_type);
for (int i = 1; i < initvals.size(); ++i)
initvals[i] = llvm::getGlobalContext().getNullValue(getDwarfCompositeTypeType()->getContainedType(i));
initvals[i] = gIR->context().getNullValue(getDwarfCompositeTypeType()->getContainedType(i));
gv->setInitializer(LLConstantStruct::get(getDwarfCompositeTypeType(), initvals));
ir->diCompositeType = llvm::DICompositeType(gv);