mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-04-17 17:29:02 +02:00
Fixed #37 — ICE: llvm::GlobalVariable::setInitializer assert failed
This commit is contained in:
@@ -153,10 +153,12 @@ void RTTIBuilder::finalize(LLType* type, LLValue* value)
|
||||
assert(st);
|
||||
|
||||
// set struct body
|
||||
std::vector<LLType*> types;
|
||||
for (int i = 0, n = inits.size(); i < n; ++i)
|
||||
types.push_back(inits[i]->getType());
|
||||
st->setBody(types);
|
||||
if (st->isOpaque()) {
|
||||
std::vector<LLType*> types;
|
||||
for (int i = 0, n = inits.size(); i < n; ++i)
|
||||
types.push_back(inits[i]->getType());
|
||||
st->setBody(types);
|
||||
}
|
||||
|
||||
// create the inititalizer
|
||||
LLConstant* tiInit = LLConstantStruct::get(st, inits);
|
||||
|
||||
Reference in New Issue
Block a user