]> git.ipfire.org Git - thirdparty/gcc.git/commit
d: Recognize pragma(inline) in the code generator.
authorIain Buclaw <ibuclaw@gdcproject.org>
Mon, 30 Mar 2020 22:19:18 +0000 (00:19 +0200)
committerIain Buclaw <ibuclaw@gdcproject.org>
Sun, 26 Apr 2020 07:50:46 +0000 (09:50 +0200)
commit67e3020b219fd83a42903e8a62e7d32e712791ff
tree48f9d54b3aafd962ad6dded2e9f5d99b6a7d8a3d
parent50929dd318a8171bad96b748491e9678f828e25e
d: Recognize pragma(inline) in the code generator.

Pragma inline affects whether functions are inlined or not.  If at the
declaration level, it affects the functions declared in the block it
controls.  If inside a function, it affects the function it is enclosed
by.  Support has been in the front-end for some time, but the
information was not leveraged by the code generation pass.

gcc/d/ChangeLog:

* decl.cc (get_symbol_decl): Set DECL_DECLARED_INLINE_P or
DECL_UNINLINABLE for declarations with pragma(inline).
* toir.cc (IRVisitor::visit (GccAsmStatement *)): Set ASM_INLINE_P if
in function decorated with pragma(inline).
gcc/d/decl.cc
gcc/d/toir.cc