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. Neil.
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
Chris Lattner
2007-Jun-07 21:24 UTC
[LLVMdev] libc dependencies, code generation questions
On Thu, 7 Jun 2007, Nick Lewycky wrote:>> 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.This is the simplifylibcalls pass, which is turned off when you pass -fno-builtins. If a pascal compiler (or anything else) doesn't want those, it should not run that pass. -Chris -- http://nondot.org/sabre/ http://llvm.org/