[llvm-commits] [llvm] r81695 - in /llvm/trunk/lib: CodeGen/AsmPrinter/AsmPrinter.cpp MC/MCAsmInfo.cpp MC/MCAsmInfoDarwin.cpp

Chris Lattner sabre at nondot.org
Sun Sep 13 12:02:16 PDT 2009


Author: lattner
Date: Sun Sep 13 14:02:16 2009
New Revision: 81695

URL: http://llvm.org/viewvc/llvm-project?rev=81695&view=rev
Log:
remove MAI::JumpTableSpecialLabelPrefix now that MAI 
has real information about linker private linkage.

Modified:
    llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
    llvm/trunk/lib/MC/MCAsmInfo.cpp
    llvm/trunk/lib/MC/MCAsmInfoDarwin.cpp

Modified: llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp?rev=81695&r1=81694&r2=81695&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp Sun Sep 13 14:02:16 2009
@@ -375,13 +375,13 @@
         if (EmittedSets.insert(JTBBs[ii]))
           printPICJumpTableSetLabel(i, JTBBs[ii]);
     
-    // On some targets (e.g. darwin) we want to emit two consequtive labels
+    // On some targets (e.g. Darwin) we want to emit two consequtive labels
     // before each jump table.  The first label is never referenced, but tells
     // the assembler and linker the extents of the jump table object.  The
     // second label is actually referenced by the code.
-    if (JTInDiffSection) {
-      if (const char *JTLabelPrefix = MAI->getJumpTableSpecialLabelPrefix())
-        O << JTLabelPrefix << "JTI" << getFunctionNumber() << '_' << i << ":\n";
+    if (JTInDiffSection && MAI->getLinkerPrivateGlobalPrefix()[0]) {
+      O << MAI->getLinkerPrivateGlobalPrefix()
+        << "JTI" << getFunctionNumber() << '_' << i << ":\n";
     }
     
     O << MAI->getPrivateGlobalPrefix() << "JTI" << getFunctionNumber() 

Modified: llvm/trunk/lib/MC/MCAsmInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCAsmInfo.cpp?rev=81695&r1=81694&r2=81695&view=diff

==============================================================================
--- llvm/trunk/lib/MC/MCAsmInfo.cpp (original)
+++ llvm/trunk/lib/MC/MCAsmInfo.cpp Sun Sep 13 14:02:16 2009
@@ -30,7 +30,6 @@
   GlobalPrefix = "";
   PrivateGlobalPrefix = ".";
   LinkerPrivateGlobalPrefix = "";
-  JumpTableSpecialLabelPrefix = 0;
   GlobalVarAddrPrefix = "";
   GlobalVarAddrSuffix = "";
   FunctionAddrPrefix = "";

Modified: llvm/trunk/lib/MC/MCAsmInfoDarwin.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCAsmInfoDarwin.cpp?rev=81695&r1=81694&r2=81695&view=diff

==============================================================================
--- llvm/trunk/lib/MC/MCAsmInfoDarwin.cpp (original)
+++ llvm/trunk/lib/MC/MCAsmInfoDarwin.cpp Sun Sep 13 14:02:16 2009
@@ -30,11 +30,6 @@
   InlineAsmStart = " InlineAsm Start";
   InlineAsmEnd = " InlineAsm End";
 
-  // In non-PIC modes, emit a special label before jump tables so that the
-  // linker can perform more accurate dead code stripping.  We do not check the
-  // relocation model here since it can be overridden later.
-  JumpTableSpecialLabelPrefix = "l";
-    
   // Directives:
   WeakDefDirective = "\t.weak_definition ";
   WeakRefDirective = "\t.weak_reference ";
@@ -54,6 +49,5 @@
   Is_EHSymbolPrivate = false;
   GlobalEHDirective = "\t.globl\t";
   SupportsWeakOmittedEHFrame = false;
-
 }
 





More information about the llvm-commits mailing list