[clang] [clang] Add clang::no_outline Attribute (PR #163666)
Sam Elliott via cfe-commits
cfe-commits at lists.llvm.org
Thu Feb 12 12:55:13 PST 2026
lenary wrote:
> Is this the opposite of `always_inline`? Then why is it spelled `no_outline` instead of `never_outline`?
This has nothing to do with the inliner. This is a control for LLVM's outlining passes. Inlining is the process of copying method bodies into where their caller is. Outlining is the process of finding similar snippets of code and extracting them into new functions which are called where the similar snippets of code were extracted from. You can both inline to and then outline from the same function, and you don't necessarily get the same as had you done nothing to it.
> If it is tightly coupled to the `nooutline` LLVM attribute then perhaps it should be spelled `nooutline` or `llvm_nooutline` instead of `no_outline`.
Please read the other comments on this PR, for why it is spelled how it is.
https://github.com/llvm/llvm-project/pull/163666
More information about the cfe-commits
mailing list