diff mbox series

[committed] d: Do not implicitly set DECL_DECLARED_INLINE_P on member functions.

Message ID 20200625153828.2304469-1-ibuclaw@gdcproject.org
State New
Headers show
Series [committed] d: Do not implicitly set DECL_DECLARED_INLINE_P on member functions. | expand

Commit Message

Iain Buclaw June 25, 2020, 3:38 p.m. UTC
Hi,

This patch removes the implicit setting of DECL_DECLARATED_INLINE_P on
member function.

This has been questionable behaviour since it was added, and though it
has no effect on wider discussions around what should be the correct
semantics of pragma(inline) within D modules, doing this tree-level
optimization has mostly zero benefit as cross-module inlining doesn't
happen anyway.

Bootstrapped and regression tested on x86_64-linux-gnu, and committed to
mainline.

Regards
Iain.

---
gcc/d/ChangeLog:

	* decl.cc (get_symbol_decl): Do not implicitly set
	DECL_DECLARED_INLINE_P on member functions.
---
 gcc/d/decl.cc | 7 -------
 1 file changed, 7 deletions(-)
diff mbox series

Patch

diff --git a/gcc/d/decl.cc b/gcc/d/decl.cc
index 77144fe11c8..15eb9a43399 100644
--- a/gcc/d/decl.cc
+++ b/gcc/d/decl.cc
@@ -1250,13 +1250,6 @@  get_symbol_decl (Declaration *decl)
 	}
 
       /* Miscellaneous function flags.  */
-      if (fd->isMember2 () || fd->isFuncLiteralDeclaration ())
-	{
-	  /* See grokmethod in cp/decl.c.  Maybe we shouldn't be setting inline
-	     flags without reason or proper handling.  */
-	  DECL_DECLARED_INLINE_P (decl->csym) = 1;
-	  DECL_NO_INLINE_WARNING_P (decl->csym) = 1;
-	}
 
       /* In [pragma/inline], functions decorated with `pragma(inline)' affects
 	 whether they are inlined or not.  */