[llvm-commits] [llvm] r68940 - in /llvm/trunk: docs/ include/llvm/ include/llvm/CodeGen/ lib/AsmParser/ lib/Bitcode/Reader/ lib/Bitcode/Writer/ lib/CodeGen/ lib/CodeGen/AsmPrinter/ lib/Linker/ lib/Target/CppBackend/ lib/VMCore/ test/CodeGen/Gener

Eli Friedman eli.friedman at gmail.com
Mon Apr 13 12:59:22 PDT 2009


On Mon, Apr 13, 2009 at 11:16 AM, Chris Lattner <clattner at apple.com> wrote:
> This could be handled by having the linker drop "available_externally"
> symbols when it does linking, but do you expect this to be a problem
> in practice?  Why would it be ok to inline a body in one translation
> unit but not in another?

>From the C99 rationale: "Second, the requirement that all definitions
of an inline function be 'exactly the same' is replaced by the
requirement that the behavior of the program should not depend on
whether a call is implemented with a visible inline definition, or the
external definition, of a function. This allows an inline definition
to be specialized for its use within a particular translation unit.
For example, the external definition of a library function might
include some argument validation that is not needed for calls made
from other functions in the same library."

-Eli




More information about the llvm-commits mailing list