[llvm-commits] [llvm] r94445 - in /llvm/trunk: include/llvm/MC/MCAsmInfo.h lib/CodeGen/AsmPrinter/AsmPrinter.cpp lib/MC/MCAsmInfo.cpp lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp

Chris Lattner sabre at nondot.org
Mon Jan 25 12:52:55 PST 2010


Author: lattner
Date: Mon Jan 25 14:52:54 2010
New Revision: 94445

URL: http://llvm.org/viewvc/llvm-project?rev=94445&view=rev
Log:
remove JumpTableDirective, it is always null.

Modified:
    llvm/trunk/include/llvm/MC/MCAsmInfo.h
    llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
    llvm/trunk/lib/MC/MCAsmInfo.cpp
    llvm/trunk/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp

Modified: llvm/trunk/include/llvm/MC/MCAsmInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/MCAsmInfo.h?rev=94445&r1=94444&r2=94445&view=diff

==============================================================================
--- llvm/trunk/include/llvm/MC/MCAsmInfo.h (original)
+++ llvm/trunk/include/llvm/MC/MCAsmInfo.h Mon Jan 25 14:52:54 2010
@@ -170,9 +170,8 @@
 
     //===--- Section Switching Directives ---------------------------------===//
     
-    /// JumpTableDirective - if non-null, the directive to emit before jump
+    /// PICJumpTableDirective - if non-null, the directive to emit before jump
     /// table entries.  FIXME: REMOVE THIS.
-    const char *JumpTableDirective;          // Defaults to NULL.
     const char *PICJumpTableDirective;       // Defaults to NULL.
 
 
@@ -374,8 +373,8 @@
     const char *getAscizDirective() const {
       return AscizDirective;
     }
-    const char *getJumpTableDirective(bool isPIC) const {
-      return isPIC ? PICJumpTableDirective : JumpTableDirective;
+    const char *getPICJumpTableDirective() const {
+      return PICJumpTableDirective;
     }
     const char *getAlignDirective() const {
       return AlignDirective;

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

==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp Mon Jan 25 14:52:54 2010
@@ -538,7 +538,8 @@
   
   // Use JumpTableDirective otherwise honor the entry size from the jump table
   // info.
-  const char *JTEntryDirective = MAI->getJumpTableDirective(isPIC);
+  const char *JTEntryDirective = 0;
+  if (isPIC) JTEntryDirective = MAI->getPICJumpTableDirective();
   bool HadJTEntryDirective = JTEntryDirective != NULL;
   if (!HadJTEntryDirective) {
     JTEntryDirective = MJTI->getEntrySize() == 4 ?

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

==============================================================================
--- llvm/trunk/lib/MC/MCAsmInfo.cpp (original)
+++ llvm/trunk/lib/MC/MCAsmInfo.cpp Mon Jan 25 14:52:54 2010
@@ -48,7 +48,6 @@
   AlignDirective = "\t.align\t";
   AlignmentIsInBytes = true;
   TextAlignFillValue = 0;
-  JumpTableDirective = 0;
   PICJumpTableDirective = 0;
   GlobalDirective = "\t.globl\t";
   SetDirective = 0;

Modified: llvm/trunk/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp?rev=94445&r1=94444&r2=94445&view=diff

==============================================================================
--- llvm/trunk/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp (original)
+++ llvm/trunk/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp Mon Jan 25 14:52:54 2010
@@ -460,7 +460,7 @@
     return;
 
   // We don't need .set machinery if we have GOT-style relocations
-  if (Subtarget->isPICStyleGOT())
+  if (Subtarget->isPICStyleGOT())  // X86-32 on ELF.
     return;
 
   O << MAI->getSetDirective() << ' ' << MAI->getPrivateGlobalPrefix()





More information about the llvm-commits mailing list