remove JumpTableDirective, it is always null.
authorChris Lattner <sabre@nondot.org>
Mon, 25 Jan 2010 20:52:54 +0000 (20:52 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 25 Jan 2010 20:52:54 +0000 (20:52 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94445 91177308-0d34-0410-b5e6-96231b3b80d8

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

index f499189a9064694b99d320ecc2e82b4208bd2c10..8a3ab738100d2503b6ea1ee4826ee652d4023d00 100644 (file)
@@ -170,9 +170,8 @@ namespace llvm {
 
     //===--- 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 @@ namespace llvm {
     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;
index 292fcdb10c54b56008a2dbf6d109efb1d6815f7f..39712ded4c234a9142acb24ac1a6d30cce412627 100644 (file)
@@ -538,7 +538,8 @@ void AsmPrinter::printPICJumpTableEntry(const MachineJumpTableInfo *MJTI,
   
   // 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 ?
index c0ca7e9df9fd7f4e4d7eb6db18fb0153edf87143..0f3c46ba826dfd81fcd559f35495cdf1f0c0cdb8 100644 (file)
@@ -48,7 +48,6 @@ MCAsmInfo::MCAsmInfo() {
   AlignDirective = "\t.align\t";
   AlignmentIsInBytes = true;
   TextAlignFillValue = 0;
-  JumpTableDirective = 0;
   PICJumpTableDirective = 0;
   GlobalDirective = "\t.globl\t";
   SetDirective = 0;
index b3654971a520eb17b9dbd9bdf88ff80e6b88efb9..44a9a28ef8996c096bd0fb7f5436effe4b9328cc 100644 (file)
@@ -460,7 +460,7 @@ void X86AsmPrinter::printPICJumpTableSetLabel(unsigned uid,
     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()