[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/X86TargetAsmInfo.cpp

Chris Lattner clattner at apple.com
Sun Sep 21 11:56:45 PDT 2008


On Sep 8, 2008, at 6:21 PM, Dale Johannesen wrote:
> URL: http://llvm.org/viewvc/llvm-project?rev=55973&view=rev
> Log:
> Fix logic for not emitting no-dead-strip for some
> objects in llvm.used (thanks Anton).  Makes visible
> 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).

Ok

> +++ llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp Mon Sep  8  
> 20:21:22 2008
> @@ -462,7 +464,17 @@
>
>   for (unsigned i = 0, e = InitList->getNumOperands(); i != e; ++i) {
>     const GlobalValue *GV = findGlobalValue(InitList->getOperand(i));
> -    if (GV && (!GV->hasInternalLinkage() || isa<Function>(GV))) {
> +    if (GV) {
> +      if (GV->hasInternalLinkage() && !isa<Function>(GV) &&
> +          ((strlen(TAI->getPrivateGlobalPrefix()) != 0 &&
> +            Mang->getValueName(GV)
> +              .substr(0,strlen(TAI->getPrivateGlobalPrefix())) ==
> +              TAI->getPrivateGlobalPrefix()) ||
> +           (strlen(TAI->getLessPrivateGlobalPrefix()) != 0 &&
> +            Mang->getValueName(GV)
> +              .substr(0,strlen(TAI->getLessPrivateGlobalPrefix())) ==
> +              TAI->getLessPrivateGlobalPrefix())))
> +        continue;

Please add a big fat comment above this if, explaining what it is  
doing and maybe even including an example.  Thanks,

-Chris




More information about the llvm-commits mailing list