[llvm-commits] [llvm] r75619 - in /llvm/trunk/lib: CodeGen/AsmPrinter/AsmPrinter.cpp Target/DarwinTargetAsmInfo.cpp
Dale Johannesen
dalej at apple.com
Fri Jul 17 15:35:04 PDT 2009
On Jul 17, 2009, at 3:05 PMPDT, Chris Lattner wrote:
> On Jul 14, 2009, at 9:56 AM, Dale Johannesen wrote:
>>>>> getValueName(GV).substr(0,strlen(getLessPrivateGlobalPrefix())) ==
>>>> + Mang->getMangledName(GV).substr(0,
>>>> +
>>>> strlen(getLessPrivateGlobalPrefix())) ==
>>>> getLessPrivateGlobalPrefix())))
>>>
>>> Dale, I think you added "less private global". Do you remember?
>>
>> Only what's in the comment:
>> /// LessPrivateGlobalPrefix - This prefix is used for symbols
>> that should
>> /// be passed through the assembler but be removed by the
>> linker. This
>> /// is "l" on Darwin, currently used for some ObjC metadata.
>
> Dale, I see a series of commits where this code was added, refined,
> etc, culimating in this specific patch:
> http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20080908/066962.html
There's some later messages which talk about this. The first one has
an example. There was originally a radar but I think the first
message is more helpful.
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20080908/066985.html
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20080908/067012.html
> Unfortunately there are no testcases and I have no idea why this
> stuff is being done. Can you explain it?
>
> I think this is really the wrong way to handle this. It add a bunch
> of ad-hoc hooks and the code in
> DarwinTargetAsmInfo::emitUsedDirectiveFor (besides being a very
> misleading name for the hook) is gross string manipulation that
> should not happen in the code generator like that.
Patches welcome! I'm certainly not wedded to the current approach or
the name (I don't like the name either, just couldn't think of
anything better).
> Why are things that don't need ".no_dead_strip" getting in the used
> list, and why can't the .no_dead_strip be emitted for them?
There are things in ObjC that the compiler cannot strip but the linker
can. We don't have a good way to represent this.
More information about the llvm-commits
mailing list