[LLVMdev] libc dependencies, code generation questions

Nick Lewycky nicholas at mxc.ca
Thu Jun 7 07:47:41 PDT 2007


Neil Booth wrote:
> Duncan Sands wrote:-
> 
>>it looks for functions with a certain name and signature, and supposes
>>that these are the standard functions with those names.
> 
> The way you write it makes this sound dubious.  The way the standard
> is written, particularly w.r.t. external identifiers, makes this 
> quite legitimate.

Assuming you're talking about the C standard, perhaps. Other languages
won't necessarily have the same rules. For that matter, even C specifies
hosted vs. free-standing. In free-standing C the library chapters of the
standard don't apply as the user is left to define their own functions.
This is popular among embedded system developers.

The LLVM pass really exists solely to optimize C code. Which is fine as
only the C frontend needs to include it in its sequence of passes (and
for that matter, exclude it when passed the '-ffreestanding' option).

Nick Lewycky



More information about the llvm-dev mailing list