[llvm-commits] [llvm] r82701 - /llvm/trunk/docs/LangRef.html

Daniel Dunbar daniel at zuster.org
Fri Sep 25 11:46:34 PDT 2009


On Fri, Sep 25, 2009 at 9:43 AM, Chris Lattner <clattner at apple.com> wrote:
> On Sep 24, 2009, at 3:27 PM, Dale Johannesen wrote:
>> On Sep 24, 2009, at 1:49 PMPDT, Török Edwin wrote:
>>> On 2009-09-24 21:38, Dale Johannesen wrote:
>>>> Clarify that llvm attaches C language semantics to
>>>> functions with names that match the C library.
>>>
>>> In fact this list is longer [1], it includes (excluding Andersens.cpp
>>> and SimplifyLibcalls)
>>> abs, absf, absl, atexit, calloc, ceil, copysign, copysignf, cosl,
>>> __dso_handle,
>>> exit, fabsf, fabsl, free, __half_powr4, __main, main, memcpy,
>>> realloc,
>>> _setjmp, setjmp,
>>> sinf, sinl.
>>
>> Functions starting with __ are fair game, I don't think we need
>> document those at this level.  Could you add the others to my list?
>
> Is there any reason to have an explicit list?  Why not just say "llvm
> assumes that functions defined in libc and libm are well known, this
> is something we'd like to fix in the future to better support
> freestanding environments." and leave it at that?

Do we have an eventual plan for dealing with this? I think it is
something like annotating functions with a "nobuiltin" attribute? Or
perhaps a "c_builtin" attribute as a positive?

Do we have any better bugzilla for this than:
  http://llvm.org/bugs/show_bug.cgi?id=4941

 - Daniel




More information about the llvm-commits mailing list