mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-07-06 15:34:10 +02:00
Fixed DStress tests nocompile/c/{const_32_B.d,const_32_C.d}.
Updated the runtest script to build libtangobos-partial.a if it hasn't already been built. Added in signbit() and va_arg!()() to libtangobos-partial.a so more of the phobos dependent DStress tests pass.
This commit is contained in:
10
gen/toir.cpp
10
gen/toir.cpp
@@ -266,8 +266,16 @@ LLConstant* VarExp::toConstElem(IRState* p)
|
||||
VarDeclaration* vd = var->isVarDeclaration();
|
||||
if (vd && vd->isConst() && vd->init)
|
||||
{
|
||||
if (vd->inuse)
|
||||
{
|
||||
error("recursive reference %s", toChars());
|
||||
return llvm::UndefValue::get(DtoType(type));
|
||||
}
|
||||
vd->inuse++;
|
||||
LLConstant* ret = DtoConstInitializer(loc, type, vd->init);
|
||||
vd->inuse--;
|
||||
// return the initializer
|
||||
return DtoConstInitializer(loc, type, vd->init);
|
||||
return ret;
|
||||
}
|
||||
|
||||
// fail
|
||||
|
||||
Reference in New Issue
Block a user