Push the context through StructType::get.

Requires LLVM >= 78258. Also remove old #if's.
This commit is contained in:
Benjamin Kramer
2009-08-06 01:47:39 +02:00
parent de0d74dc68
commit 977fa551ee
22 changed files with 57 additions and 70 deletions

View File

@@ -195,7 +195,7 @@ LLConstant * IrStruct::createStructDefaultInitializer()
}
// build constant struct
llvm::Constant* definit = LLConstantStruct::get(constants, packed);
llvm::Constant* definit = LLConstantStruct::get(gIR->context(), constants, packed);
#if 0
IF_LOG Logger::cout() << "final default initializer: " << *definit << std::endl;
#endif
@@ -384,7 +384,7 @@ LLConstant * IrStruct::createStructInitializer(StructInitializer * si)
// build constant
assert(!constants.empty());
llvm::Constant* c = LLConstantStruct::get(&constants[0], constants.size(), packed);
llvm::Constant* c = LLConstantStruct::get(gIR->context(), &constants[0], constants.size(), packed);
IF_LOG Logger::cout() << "final struct initializer: " << *c << std::endl;
return c;
}