mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-03-01 01:53:16 +01:00
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:
@@ -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);
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user