mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-08-01 20:10:04 +02:00
Don't print the entire declaration of the alliassee when ->toChars() is
called on an `AliasDeclaration`; just printing the name will do. This fixes #305, which otherwise tries to generate {{{ class E { void A() { alias /* recurse into E->toCBuffer() */ m; } } }}} by way of an infinite recursion (causing a segfault when the stack runs out).
This commit is contained in:
@@ -1774,7 +1774,7 @@ DValue* AssertExp::toElem(IRState* p)
|
||||
condty->ty == Tclass &&
|
||||
!((TypeClass*)condty)->sym->isInterfaceDeclaration())
|
||||
{
|
||||
Logger::print("calling class invariant");
|
||||
Logger::println("calling class invariant");
|
||||
llvm::Function* fn = LLVM_D_GetRuntimeFunction(gIR->module, "_d_invariant");
|
||||
LLValue* arg = DtoBitCast(cond->getRVal(), fn->getFunctionType()->getParamType(0));
|
||||
gIR->CreateCallOrInvoke(fn, arg);
|
||||
|
||||
Reference in New Issue
Block a user