From 3035735bc93568f86cecd11e7434654cf65caf9a Mon Sep 17 00:00:00 2001 From: David Nadlinger Date: Fri, 14 Jun 2013 19:11:43 +0200 Subject: [PATCH] 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. --- dmd2/declaration.h | 2 +- gen/tollvm.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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