Adjust LDC to work with the LLVMContext LLVM changes.

This means we now require a fairly new LLVM revision. I use 75234.
This commit is contained in:
Christian Kamm
2009-07-10 21:30:02 +02:00
parent c4c38715ef
commit 756a2cb2a1
18 changed files with 54 additions and 43 deletions

View File

@@ -38,7 +38,7 @@ static LLGlobalVariable* emitDwarfGlobalDecl(const LLStructType* type, const cha
LLGlobalValue::LinkageTypes linkage = linkonce
? DEBUGINFO_LINKONCE_LINKAGE_TYPE
: LLGlobalValue::InternalLinkage;
LLGlobalVariable* gv = new LLGlobalVariable(type, true, linkage, NULL, name, gIR->module);
LLGlobalVariable* gv = new LLGlobalVariable(*gIR->module, type, true, linkage, NULL, name);
gv->setSection("llvm.metadata");
return gv;
}
@@ -256,7 +256,7 @@ static llvm::DICompositeType dwarfCompositeType(Type* type, llvm::DICompileUnit
elems[1] = DBG_CAST(ptr);
LLConstant* ca = LLConstantArray::get(at, elems);
members = new LLGlobalVariable(ca->getType(), true, LLGlobalValue::InternalLinkage, ca, ".array", gIR->module);
members = new LLGlobalVariable(*gIR->module, ca->getType(), true, LLGlobalValue::InternalLinkage, ca, ".array");
members->setSection("llvm.metadata");
name = DtoConstStringPtr(t->toChars(), "llvm.metadata");
@@ -330,7 +330,7 @@ static llvm::DICompositeType dwarfCompositeType(Type* type, llvm::DICompileUnit
const LLArrayType* at = LLArrayType::get(DBG_TYPE, elems.size());
LLConstant* ca = LLConstantArray::get(at, elems);
members = new LLGlobalVariable(ca->getType(), true, LLGlobalValue::InternalLinkage, ca, ".array", gIR->module);
members = new LLGlobalVariable(*gIR->module, ca->getType(), true, LLGlobalValue::InternalLinkage, ca, ".array");
members->setSection("llvm.metadata");
}