FuncDeclaration::canInline diff reduction.

The new arguments to the call in DtoLinkage do not exactly
match what was there before, but have been harmonized with
the other canInline call.
This commit is contained in:
David Nadlinger
2013-06-14 19:11:43 +02:00
parent 4f1374e211
commit 3035735bc9
2 changed files with 2 additions and 2 deletions

View File

@@ -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);

View File

@@ -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