[llvm-commits] [llvm] r55973 - in /llvm/trunk: include/llvm/Target/TargetAsmInfo.h lib/CodeGen/AsmPrinter/AsmPrinter.cpp lib/Target/ARM/ARMTargetAsmInfo.cpp lib/Target/PowerPC/PPCTargetAsmInfo.cpp lib/Target/TargetAsmInfo.cpp lib/Target/X86/X86Ta

Chris Lattner clattner at apple.com
Sun Sep 21 12:00:39 PDT 2008


On Sep 9, 2008, at 11:19 AM, Dale Johannesen wrote:
> On Sep 9, 2008, at 1:02 AMPDT, Anton Korobeynikov wrote:
>> Hi, Dale
>>
>>> the magic 'l' prefix for symbols on Darwin which are
>>> to be passed through the assembler, then removed at
>>> linktime (previously all references to this had been
>>> hidden in the ObjC FE code, oh well).
>> Sorry for bothering you again, but changing semantics of llvm.used in
>> such target- and language- specific way is a bit... uhm...
>> questionable.
>
> The underlying problem is that two different characteristics are
> involved:  "the compiler must not delete this symbol", and "the
> compiler must emit something special to affect assembly- or link- time
> behavior".   Currently both these key off llvm.used, which is not so
> good because they are not the same thing and do not always apply to
> the same symbols.  I have been patching the existing mechanism to make
> it work, but I could be persuaded that a new mechanism is better.

Ok, it sounds like overloading llvm.used like this is the problem.   
Maybe the issues is that we need two different "used" lists? One that  
is "must be in the assembler output" and "one that must be in the  
linker output".  The current used list would be the later, and ObjC  
could use the former?

-Chris



More information about the llvm-commits mailing list