[llvm-commits] [llvm] r107205 - in /llvm/trunk: bindings/ada/llvm/ docs/ include/llvm-c/ include/llvm/ include/llvm/CodeGen/ include/llvm/MC/ include/llvm/Target/ lib/AsmParser/ lib/Bitcode/Reader/ lib/Bitcode/Writer/ lib/CodeGen/ lib/CodeGen/AsmPrinter/ lib/Linker/ lib/MC/ lib/Target/ lib/Target/CppBackend/ lib/Target/XCore/AsmPrinter/ lib/Transforms/IPO/ lib/VMCore/ tools/llvm-nm/

Bill Wendling wendling at apple.com
Thu Jul 1 01:29:54 PDT 2010


On Jun 30, 2010, at 9:03 PM, Chris Lattner wrote:

>>>>> I'll check to see if it's used. If it's not used, then it's relying upon the hack down below, which is bad. However, I much prefer having the prefix string in one place than relying upon it being buried in some deep part of the asm printer.
>>>> 
>>>> I don't really understand what you mean.
>>>> 
>>> I want to separate it out from the "linker_private" linkage. In particular, I don't want to say that it will always have the same prefix as linker_private. That's the case with Darwin, but I don't see why that has to be the case for every linker that would want to implement it.
>>> 
>> Or for every target for that matter. Otherwise, these linkages are restricted to a small subset of usages -- Objective-C metadata on Darwin.
> 
> This feature is only supported on one OS (darwin) and all of the targets (arm/ppc/x86) use the same prefix.  I don't see any reason to hookize something that is constant across all supported targets.
> 
It's not necessarily restricted to Darwin from now until forever, right? Any other platform is free to implement this as they choose. And they don't have to follow any of the restrictions that Darwin places on it. I.e., that they should require having the same prefixes for both, etc.

But if it is restricted to Darwin and is not for any other platform to use ever, then I'm not so certain that these linkage types are a great idea. Or at least the names should reflect as much - maybe darwin_linker_private, darwin_linker_private_weak.

-bw





More information about the llvm-commits mailing list