diff --git a/dmd2/declaration.h b/dmd2/declaration.h index cb326a57..27211c5a 100644 --- a/dmd2/declaration.h +++ b/dmd2/declaration.h @@ -886,7 +886,7 @@ struct FuncDeclaration : Declaration virtual int addPostInvariant(); Expression *interpret(InterState *istate, Expressions *arguments, Expression *thisexp = NULL); void inlineScan(); - int canInline(int hasthis, int hdrscan = false, int statementsToo = true); + int canInline(int hasthis, int hdrscan, int statementsToo); Expression *expandInline(InlineScanState *iss, Expression *ethis, Expressions *arguments, Statement **ps); const char *kind(); void toDocBuffer(OutBuffer *buf, Scope *sc); diff --git a/gen/tollvm.cpp b/gen/tollvm.cpp index cae8f2ea..d960442c 100644 --- a/gen/tollvm.cpp +++ b/gen/tollvm.cpp @@ -435,7 +435,7 @@ LLGlobalValue::LinkageTypes DtoLinkage(Dsymbol* sym) for (Dsymbol* parent = sym->parent; parent ; parent = parent->parent) { FuncDeclaration *fd = parent->isFuncDeclaration(); - if (fd && !fd->canInline(fd->needThis())) + if (fd && !fd->canInline(fd->needThis(), false, false)) { // We also cannot internalize nested functions which are // leaked to the outside via a templated return type, because