mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-02-10 00:43:13 +01:00
Backport StructLiteralExp::toChars infinite recursion fix.
We absolutely need this for log output/debugging.
This commit is contained in:
@@ -4620,7 +4620,19 @@ void StructLiteralExp::toCBuffer(OutBuffer *buf, HdrGenState *hgs)
|
||||
{
|
||||
buf->writestring(sd->toChars());
|
||||
buf->writeByte('(');
|
||||
#if IN_LLVM // Backport of DMD pull request 2183.
|
||||
if (stageflags & 32)
|
||||
buf->writestring("...");
|
||||
else
|
||||
{
|
||||
int old = stageflags;
|
||||
stageflags |= 32;
|
||||
#endif
|
||||
argsToCBuffer(buf, elements, hgs);
|
||||
#if IN_LLVM
|
||||
stageflags = old;
|
||||
}
|
||||
#endif
|
||||
buf->writeByte(')');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user