mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-20 14:53:14 +01:00
This ''should'' fix #139 , I failed to produce a testcase, but I would imagine this to be correct, and it removes '''that''' error when building Hybrid.
This commit is contained in:
@@ -224,6 +224,13 @@ LLConstant* VarExp::toConstElem(IRState* p)
|
||||
m = llvm::ConstantExpr::getBitCast(m, vartype);
|
||||
return m;
|
||||
}
|
||||
else if (VarDeclaration* vd = var->isVarDeclaration())
|
||||
{
|
||||
// return the initializer
|
||||
assert(vd->init);
|
||||
return DtoConstInitializer(loc, type, vd->init);
|
||||
}
|
||||
// fail
|
||||
assert(0 && "Unsupported const VarExp kind");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user