remove TargetAsmInfo::TM, which is now dead. The basic TAI class now
authorChris Lattner <sabre@nondot.org>
Sun, 2 Aug 2009 04:27:24 +0000 (04:27 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 2 Aug 2009 04:27:24 +0000 (04:27 +0000)
no longer depends on TM!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77863 91177308-0d34-0410-b5e6-96231b3b80d8

28 files changed:
include/llvm/Target/COFFTargetAsmInfo.h
include/llvm/Target/DarwinTargetAsmInfo.h
include/llvm/Target/ELFTargetAsmInfo.h
include/llvm/Target/TargetAsmInfo.h
lib/Target/ARM/ARMTargetAsmInfo.cpp
lib/Target/ARM/ARMTargetAsmInfo.h
lib/Target/Alpha/AlphaTargetAsmInfo.cpp
lib/Target/COFFTargetAsmInfo.cpp
lib/Target/CellSPU/SPUTargetAsmInfo.cpp
lib/Target/CellSPU/SPUTargetAsmInfo.h
lib/Target/DarwinTargetAsmInfo.cpp
lib/Target/ELFTargetAsmInfo.cpp
lib/Target/MSP430/MSP430TargetAsmInfo.cpp
lib/Target/MSP430/MSP430TargetAsmInfo.h
lib/Target/Mips/MipsTargetAsmInfo.cpp
lib/Target/Mips/MipsTargetAsmInfo.h
lib/Target/PIC16/PIC16TargetAsmInfo.cpp
lib/Target/PowerPC/PPCTargetAsmInfo.cpp
lib/Target/PowerPC/PPCTargetAsmInfo.h
lib/Target/Sparc/SparcTargetAsmInfo.cpp
lib/Target/Sparc/SparcTargetAsmInfo.h
lib/Target/SystemZ/SystemZTargetAsmInfo.cpp
lib/Target/SystemZ/SystemZTargetAsmInfo.h
lib/Target/TargetAsmInfo.cpp
lib/Target/X86/X86TargetAsmInfo.cpp
lib/Target/X86/X86TargetAsmInfo.h
lib/Target/XCore/XCoreTargetAsmInfo.cpp
lib/Target/XCore/XCoreTargetAsmInfo.h

index a035f2bb873200a89799c8d20cd6773a89c14efd..fd9fb45f0bde373cedbe76b847811d383dd8a492 100644 (file)
@@ -15,7 +15,7 @@
 namespace llvm {
   class COFFTargetAsmInfo : public TargetAsmInfo {
   protected:
-    explicit COFFTargetAsmInfo(const TargetMachine &TM);
+    explicit COFFTargetAsmInfo();
       
   };
 }
index 99e4130c1bf3e8eb02354af8d1cdee7ad5b9cb22..0834390600f6d96c061fefeffe24f99d18551993 100644 (file)
@@ -24,7 +24,7 @@ namespace llvm {
   class Mangler;
 
   struct DarwinTargetAsmInfo : public TargetAsmInfo {
-    explicit DarwinTargetAsmInfo(const TargetMachine &TM);
+    explicit DarwinTargetAsmInfo();
   };
 }
 
index 1b141d5181c076c2eef85d60af4a991415ca1e30..46a88d5c7004e5c8743faef218166a89b5caaeec 100644 (file)
@@ -19,9 +19,7 @@
 
 namespace llvm {
 
-  struct ELFTargetAsmInfo : public TargetAsmInfo {
-    ELFTargetAsmInfo(const TargetMachine &TM);
-  };
+  
 }
 
 
index 958a701cefc42ea3f504aa6bea5eb4ece078e886..9d37d49a46713e88ad5bb20d71264d8c403c6533 100644 (file)
 
 namespace llvm {
   template <typename T> class SmallVectorImpl;
-  class TargetMachine;
   
   /// TargetAsmInfo - This class is intended to be used as a base class for asm
   /// properties and features specific to the target.
   class TargetAsmInfo {
   protected:
-    /// TM - The current TargetMachine.
-    const TargetMachine &TM;
-
     //===------------------------------------------------------------------===//
     // Properties to be set by the target writer, used to configure asm printer.
     //
@@ -376,7 +372,7 @@ namespace llvm {
     const char *const *AsmTransCBE; // Defaults to empty
 
   public:
-    explicit TargetAsmInfo(const TargetMachine &TM);
+    explicit TargetAsmInfo();
     virtual ~TargetAsmInfo();
 
     /// Measure the specified inline asm to determine an approximation of its
index ac0f6107cc611a5884bfdd1b318b7e090d30631a..b88110242c85c28775cf5b99b39293a1c75354df 100644 (file)
@@ -56,7 +56,7 @@ ARMDarwinTargetAsmInfo::ARMDarwinTargetAsmInfo(const ARMBaseTargetMachine &TM):
 }
 
 ARMELFTargetAsmInfo::ARMELFTargetAsmInfo(const ARMBaseTargetMachine &TM):
-  ARMTargetAsmInfo<ELFTargetAsmInfo>(TM) {
+  ARMTargetAsmInfo<TargetAsmInfo>(TM) {
   Subtarget = &TM.getSubtarget<ARMSubtarget>();
 
   NeedsSet = false;
index 2b0b11282fb458886f2fb34d1387c550f990faba..6eaa4d42fb1069be1cf7d46b6f4aafc214069f8d 100644 (file)
@@ -26,7 +26,7 @@ namespace llvm {
 
   template <class BaseTAI>
   struct ARMTargetAsmInfo : public BaseTAI {
-    explicit ARMTargetAsmInfo(const ARMBaseTargetMachine &TM) : BaseTAI(TM) {
+    explicit ARMTargetAsmInfo(const ARMBaseTargetMachine &TM) {
       BaseTAI::AsmTransCBE = arm_asm_table;
 
       BaseTAI::AlignmentIsInBytes = false;
@@ -51,7 +51,7 @@ namespace llvm {
     explicit ARMDarwinTargetAsmInfo(const ARMBaseTargetMachine &TM);
   };
 
-  struct ARMELFTargetAsmInfo : public ARMTargetAsmInfo<ELFTargetAsmInfo> {
+  struct ARMELFTargetAsmInfo : public ARMTargetAsmInfo<TargetAsmInfo> {
     explicit ARMELFTargetAsmInfo(const ARMBaseTargetMachine &TM);
   };
 
index 7f8446e960a62022bd56777aca3921e89dec3ceb..ee7166e8bfaf825e96a2ace4b471af01500aef25 100644 (file)
@@ -16,8 +16,7 @@
 
 using namespace llvm;
 
-AlphaTargetAsmInfo::AlphaTargetAsmInfo(const AlphaTargetMachine &TM)
-  : TargetAsmInfo(TM) {
+AlphaTargetAsmInfo::AlphaTargetAsmInfo(const AlphaTargetMachine &TM) {
   AlignmentIsInBytes = false;
   PrivateGlobalPrefix = "$";
   JumpTableDirective = ".gprel32";
index 970096b473c011ca1d9323f78df69e8a3be7837b..64f87c0646a13dd80304b76c07152cfb89dc24c9 100644 (file)
@@ -16,9 +16,7 @@
 #include "llvm/ADT/SmallVector.h"
 using namespace llvm;
 
-COFFTargetAsmInfo::COFFTargetAsmInfo(const TargetMachine &TM)
-  : TargetAsmInfo(TM) {
-
+COFFTargetAsmInfo::COFFTargetAsmInfo() {
   GlobalPrefix = "_";
   LCOMMDirective = "\t.lcomm\t";
   COMMDirectiveTakesAlignment = false;
index 2bbf4be8e805e8a4e844ccff468994dc55c86f19..76c4db483073fd1b6bb3d2caef2fd0f1319f47ca 100644 (file)
@@ -21,7 +21,7 @@ using namespace llvm;
 using namespace llvm::dwarf;
 
 SPULinuxTargetAsmInfo::SPULinuxTargetAsmInfo(const SPUTargetMachine &TM) :
-    SPUTargetAsmInfo<ELFTargetAsmInfo>(TM) {
+    SPUTargetAsmInfo<TargetAsmInfo>(TM) {
   PCSymbol = ".";
   CommentString = "#";
   GlobalPrefix = "";
index e773fa2b3881a761fce43c75377d07f42102c312..8217c16fb87967275c78d67f12163a45fa337047 100644 (file)
@@ -15,7 +15,6 @@
 #define SPUTARGETASMINFO_H
 
 #include "llvm/Target/TargetAsmInfo.h"
-#include "llvm/Target/ELFTargetAsmInfo.h"
 #include "SPUTargetMachine.h"
 #include "SPUSubtarget.h"
 
@@ -26,8 +25,7 @@ namespace llvm {
   
   template <class BaseTAI>
   struct SPUTargetAsmInfo : public BaseTAI {
-    explicit SPUTargetAsmInfo(const SPUTargetMachine &TM):
-      BaseTAI(TM) {
+    explicit SPUTargetAsmInfo(const SPUTargetMachine &TM) {
       /* (unused today)
        * const SPUSubtarget *Subtarget = &TM.getSubtarget<SPUSubtarget>(); */
 
@@ -41,7 +39,7 @@ namespace llvm {
     }
   };
   
-  struct SPULinuxTargetAsmInfo : public SPUTargetAsmInfo<ELFTargetAsmInfo> {
+  struct SPULinuxTargetAsmInfo : public SPUTargetAsmInfo<TargetAsmInfo> {
     explicit SPULinuxTargetAsmInfo(const SPUTargetMachine &TM);
   };
 } // namespace llvm
index 24bc9a5fa79cdb7042f42575c7c7b351d9c262a6..ff1f3908a0f0d6010c5976e2890b2ceb1733237a 100644 (file)
 //
 //===----------------------------------------------------------------------===//
 
-#include "llvm/Constants.h"
-#include "llvm/DerivedTypes.h"
-#include "llvm/Function.h"
-#include "llvm/GlobalVariable.h"
-#include "llvm/ADT/StringExtras.h"
-#include "llvm/Support/ErrorHandling.h"
-#include "llvm/Support/Mangler.h"
 #include "llvm/Target/DarwinTargetAsmInfo.h"
-#include "llvm/Target/TargetMachine.h"
-#include "llvm/Target/TargetData.h"
-
 using namespace llvm;
 
-DarwinTargetAsmInfo::DarwinTargetAsmInfo(const TargetMachine &TM) 
-  : TargetAsmInfo(TM) {
+DarwinTargetAsmInfo::DarwinTargetAsmInfo() {
   // Common settings for all Darwin targets.
   // Syntax:
   GlobalPrefix = "_";
index e3259bd916e0cf7b4ff93460354a656985cb7ba4..1b8ceb395c4fb409f1fbcb2325772abc95125d1a 100644 (file)
@@ -15,7 +15,3 @@
 #include "llvm/Target/ELFTargetAsmInfo.h"
 #include "llvm/ADT/SmallVector.h"
 using namespace llvm;
-
-ELFTargetAsmInfo::ELFTargetAsmInfo(const TargetMachine &TM)
-  : TargetAsmInfo(TM) {
-}
index 43a521d3768220debb54111832aeb51953bb6a4e..8f9f1a20083f05520fe04064436ec2d6bcbab0f9 100644 (file)
@@ -14,7 +14,6 @@
 #include "MSP430TargetAsmInfo.h"
 using namespace llvm;
 
-MSP430TargetAsmInfo::MSP430TargetAsmInfo(const TargetMachine &TM)
-  : ELFTargetAsmInfo(TM) {
+MSP430TargetAsmInfo::MSP430TargetAsmInfo(const TargetMachine &TM) {
   AlignmentIsInBytes = false;
 }
index 93ed04f1bcbb89c4fdc7c0d31fba5c42aebdc59f..d6a20fbedd67ef2fd11b9717e124eb2a97b60099 100644 (file)
 #ifndef MSP430TARGETASMINFO_H
 #define MSP430TARGETASMINFO_H
 
-#include "llvm/Target/ELFTargetAsmInfo.h"
+#include "llvm/Target/TargetAsmInfo.h"
 
 namespace llvm {
-  struct MSP430TargetAsmInfo : public ELFTargetAsmInfo {
+  class TargetMachine;
+  struct MSP430TargetAsmInfo : public TargetAsmInfo {
     explicit MSP430TargetAsmInfo(const TargetMachine &TM);
   };
 
index d9a53698f6ec5d367bcda32432284dabf5860ef8..96bb8a18d9e6bcb1f79a97b1bb49b94dd92c259c 100644 (file)
@@ -15,9 +15,7 @@
 #include "MipsTargetMachine.h"
 using namespace llvm;
 
-MipsTargetAsmInfo::MipsTargetAsmInfo(const MipsTargetMachine &TM)
-  : ELFTargetAsmInfo(TM) {
-
+MipsTargetAsmInfo::MipsTargetAsmInfo(const MipsTargetMachine &TM) {
   AlignmentIsInBytes          = false;
   COMMDirectiveTakesAlignment = true;
   Data16bitsDirective         = "\t.half\t";
index e3cfadc47ecde80f2b415fd7d5df7c5333d876ad..cbfb50e5b331c2cfedbaa7bf6d9df518be25f3e9 100644 (file)
 #ifndef MIPSTARGETASMINFO_H
 #define MIPSTARGETASMINFO_H
 
-#include "llvm/Target/ELFTargetAsmInfo.h"
+#include "llvm/Target/TargetAsmInfo.h"
 
 namespace llvm {
   // Forward declaration.
   class MipsTargetMachine;
 
-  struct MipsTargetAsmInfo : public ELFTargetAsmInfo {
+  struct MipsTargetAsmInfo : public TargetAsmInfo {
     explicit MipsTargetAsmInfo(const MipsTargetMachine &TM);
   };
 
index 9912543a87cc3fc3506247cbf3624961e573f7f6..7a48a469101f496826bacfc47d7214cccccb6f0c 100644 (file)
@@ -20,8 +20,7 @@
 using namespace llvm;
 
 PIC16TargetAsmInfo::
-PIC16TargetAsmInfo(const PIC16TargetMachine &TM) 
-  : TargetAsmInfo(TM) {
+PIC16TargetAsmInfo(const PIC16TargetMachine &TM) {
   CommentString = ";";
   GlobalPrefix = PAN::getTagName(PAN::PREFIX_SYMBOL);
   GlobalDirective = "\tglobal\t";
index 6322a2e68fd937aa7f9235293272ec5b2a58f076..0696a9016351658366c33a67cb2f3d7680f6998d 100644 (file)
@@ -33,7 +33,7 @@ PPCDarwinTargetAsmInfo::PPCDarwinTargetAsmInfo(const PPCTargetMachine &TM) :
 }
 
 PPCLinuxTargetAsmInfo::PPCLinuxTargetAsmInfo(const PPCTargetMachine &TM) :
-  PPCTargetAsmInfo<ELFTargetAsmInfo>(TM) {
+  PPCTargetAsmInfo<TargetAsmInfo>(TM) {
   CommentString = "#";
   GlobalPrefix = "";
   PrivateGlobalPrefix = ".L";
index 79dabf4f6321af2a869103659ef6fbb91eb6e4b0..34f4dd5136cdc78767003211c318306d8676ecb0 100644 (file)
@@ -24,8 +24,7 @@ namespace llvm {
 
   template <class BaseTAI>
   struct PPCTargetAsmInfo : public BaseTAI {
-    explicit PPCTargetAsmInfo(const PPCTargetMachine &TM):
-      BaseTAI(TM) {
+    explicit PPCTargetAsmInfo(const PPCTargetMachine &TM) {
       const PPCSubtarget *Subtarget = &TM.getSubtarget<PPCSubtarget>();
       bool isPPC64 = Subtarget->isPPC64();
 
@@ -48,7 +47,7 @@ namespace llvm {
     explicit PPCDarwinTargetAsmInfo(const PPCTargetMachine &TM);
   };
 
-  struct PPCLinuxTargetAsmInfo : public PPCTargetAsmInfo<ELFTargetAsmInfo> {
+  struct PPCLinuxTargetAsmInfo : public PPCTargetAsmInfo<TargetAsmInfo> {
     explicit PPCLinuxTargetAsmInfo(const PPCTargetMachine &TM);
   };
 
index 0ceaf1142ed02ca01c5effb07dc5d0e9725e5340..6c577925fe38b4fbf898b87eee1dda9ceaf88398 100644 (file)
@@ -15,8 +15,7 @@
 #include "llvm/ADT/SmallVector.h"
 using namespace llvm;
 
-SparcELFTargetAsmInfo::SparcELFTargetAsmInfo(const TargetMachine &TM)
-  : ELFTargetAsmInfo(TM) {
+SparcELFTargetAsmInfo::SparcELFTargetAsmInfo(const TargetMachine &TM) {
   Data16bitsDirective = "\t.half\t";
   Data32bitsDirective = "\t.word\t";
   Data64bitsDirective = 0;  // .xword is only supported by V9.
index ae646c3911d7846a9ebf2c399d32eb83db106857..4c1266ad8fd0eb2db6bdfb6ef4fc3eb197ff1826 100644 (file)
 #ifndef SPARCTARGETASMINFO_H
 #define SPARCTARGETASMINFO_H
 
-#include "llvm/Target/ELFTargetAsmInfo.h"
+#include "llvm/Target/TargetAsmInfo.h"
 
 namespace llvm {
 
   // Forward declaration.
   class TargetMachine;
 
-  struct SparcELFTargetAsmInfo : public ELFTargetAsmInfo {
+  struct SparcELFTargetAsmInfo : public TargetAsmInfo {
     explicit SparcELFTargetAsmInfo(const TargetMachine &TM);
   };
 
index 2f17676eef068a99f0743dfde83fea01fb8b42f3..25877f8da8bf736a34cb2887e2cbe7d89f0a74b9 100644 (file)
@@ -16,8 +16,7 @@
 
 using namespace llvm;
 
-SystemZTargetAsmInfo::SystemZTargetAsmInfo(const SystemZTargetMachine &TM)
-  : ELFTargetAsmInfo(TM) {
+SystemZTargetAsmInfo::SystemZTargetAsmInfo(const SystemZTargetMachine &TM) {
   AlignmentIsInBytes = true;
 
   PrivateGlobalPrefix = ".L";
index 98b50d4978408cc43b207a3056584328fa655d06..e7bf8954f6428443d219a4af71bb92907be6cf40 100644 (file)
@@ -21,7 +21,7 @@ namespace llvm {
   // Forward declaration.
   class SystemZTargetMachine;
 
-  struct SystemZTargetAsmInfo : public ELFTargetAsmInfo {
+  struct SystemZTargetAsmInfo : public TargetAsmInfo {
     explicit SystemZTargetAsmInfo(const SystemZTargetMachine &TM);
   };
 
index 24a11458e9bdf474abfaecc4fe47f3fce41a0fef..65dac65665ce51c10f9d1471a4e778fa5e515a4c 100644 (file)
@@ -17,7 +17,7 @@
 #include <cstring>
 using namespace llvm;
 
-TargetAsmInfo::TargetAsmInfo(const TargetMachine &tm) : TM(tm) {
+TargetAsmInfo::TargetAsmInfo() {
   ZeroFillDirective = 0;
   NonexecutableStackDirective = 0;
   NeedsSet = false;
index 07350718f1a401e76ca649aeae6886b61d91648b..a8eaf5cf64e237befa0a944d53924e3f53dec637 100644 (file)
@@ -87,7 +87,7 @@ X86DarwinTargetAsmInfo::X86DarwinTargetAsmInfo(const X86TargetMachine &TM):
 }
 
 X86ELFTargetAsmInfo::X86ELFTargetAsmInfo(const X86TargetMachine &TM) :
-  X86TargetAsmInfo<ELFTargetAsmInfo>(TM) {
+  X86TargetAsmInfo<TargetAsmInfo>(TM) {
 
   PrivateGlobalPrefix = ".L";
   WeakRefDirective = "\t.weak\t";
index f0b23ccadd4c24bc48bbe26f49be8db521cb8f55..92fa7432a2330379d2555f51660ca725ca56eb6f 100644 (file)
@@ -27,7 +27,7 @@ namespace llvm {
 
   template <class BaseTAI>
   struct X86TargetAsmInfo : public BaseTAI {
-    explicit X86TargetAsmInfo(const X86TargetMachine &TM) : BaseTAI(TM) {
+    explicit X86TargetAsmInfo(const TargetMachine &TM) {
       BaseTAI::AsmTransCBE = x86_asm_table;
       BaseTAI::AssemblerDialect =TM.getSubtarget<X86Subtarget>().getAsmFlavor();
     }
@@ -39,7 +39,7 @@ namespace llvm {
     explicit X86DarwinTargetAsmInfo(const X86TargetMachine &TM);
   };
 
-  struct X86ELFTargetAsmInfo : public X86TargetAsmInfo<ELFTargetAsmInfo> {
+  struct X86ELFTargetAsmInfo : public X86TargetAsmInfo<TargetAsmInfo> {
     explicit X86ELFTargetAsmInfo(const X86TargetMachine &TM);
   };
 
index 48502d07f63b672124e96d9f1792a5be05e2c836..6f2dbbb7bcecf1b2b6ad57c26e0c91c53396534a 100644 (file)
@@ -10,8 +10,7 @@
 #include "XCoreTargetAsmInfo.h"
 using namespace llvm;
 
-XCoreTargetAsmInfo::XCoreTargetAsmInfo(const TargetMachine &TM)
-  : ELFTargetAsmInfo(TM) {
+XCoreTargetAsmInfo::XCoreTargetAsmInfo(const TargetMachine &TM) {
   SupportsDebugInformation = true;
   Data16bitsDirective = "\t.short\t";
   Data32bitsDirective = "\t.long\t";
index f220815ff982b1a3cb726ff4af7ce9d0853129a0..d1ceb3ff6c5ddda1f2bcbe3ec35b552007d5dc2d 100644 (file)
 #ifndef XCORETARGETASMINFO_H
 #define XCORETARGETASMINFO_H
 
-#include "llvm/Target/ELFTargetAsmInfo.h"
+#include "llvm/Target/TargetAsmInfo.h"
 
 namespace llvm {
-
-  class XCoreTargetAsmInfo : public ELFTargetAsmInfo {
+  class TargetMachine;
+  class XCoreTargetAsmInfo : public TargetAsmInfo {
   public:
     explicit XCoreTargetAsmInfo(const TargetMachine &TM);
   };