remove TargetAsmInfo::TM, which is now dead. The basic TAI class now
no longer depends on TM!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77863 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Target/ARM/ARMTargetAsmInfo.cpp b/lib/Target/ARM/ARMTargetAsmInfo.cpp
index ac0f610..b881102 100644
--- a/lib/Target/ARM/ARMTargetAsmInfo.cpp
+++ b/lib/Target/ARM/ARMTargetAsmInfo.cpp
@@ -56,7 +56,7 @@
}
ARMELFTargetAsmInfo::ARMELFTargetAsmInfo(const ARMBaseTargetMachine &TM):
- ARMTargetAsmInfo<ELFTargetAsmInfo>(TM) {
+ ARMTargetAsmInfo<TargetAsmInfo>(TM) {
Subtarget = &TM.getSubtarget<ARMSubtarget>();
NeedsSet = false;
diff --git a/lib/Target/ARM/ARMTargetAsmInfo.h b/lib/Target/ARM/ARMTargetAsmInfo.h
index 2b0b112..6eaa4d4 100644
--- a/lib/Target/ARM/ARMTargetAsmInfo.h
+++ b/lib/Target/ARM/ARMTargetAsmInfo.h
@@ -26,7 +26,7 @@
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 @@
explicit ARMDarwinTargetAsmInfo(const ARMBaseTargetMachine &TM);
};
- struct ARMELFTargetAsmInfo : public ARMTargetAsmInfo<ELFTargetAsmInfo> {
+ struct ARMELFTargetAsmInfo : public ARMTargetAsmInfo<TargetAsmInfo> {
explicit ARMELFTargetAsmInfo(const ARMBaseTargetMachine &TM);
};
diff --git a/lib/Target/Alpha/AlphaTargetAsmInfo.cpp b/lib/Target/Alpha/AlphaTargetAsmInfo.cpp
index 7f8446e..ee7166e 100644
--- a/lib/Target/Alpha/AlphaTargetAsmInfo.cpp
+++ b/lib/Target/Alpha/AlphaTargetAsmInfo.cpp
@@ -16,8 +16,7 @@
using namespace llvm;
-AlphaTargetAsmInfo::AlphaTargetAsmInfo(const AlphaTargetMachine &TM)
- : TargetAsmInfo(TM) {
+AlphaTargetAsmInfo::AlphaTargetAsmInfo(const AlphaTargetMachine &TM) {
AlignmentIsInBytes = false;
PrivateGlobalPrefix = "$";
JumpTableDirective = ".gprel32";
diff --git a/lib/Target/COFFTargetAsmInfo.cpp b/lib/Target/COFFTargetAsmInfo.cpp
index 970096b..64f87c0 100644
--- a/lib/Target/COFFTargetAsmInfo.cpp
+++ b/lib/Target/COFFTargetAsmInfo.cpp
@@ -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;
diff --git a/lib/Target/CellSPU/SPUTargetAsmInfo.cpp b/lib/Target/CellSPU/SPUTargetAsmInfo.cpp
index 2bbf4be..76c4db4 100644
--- a/lib/Target/CellSPU/SPUTargetAsmInfo.cpp
+++ b/lib/Target/CellSPU/SPUTargetAsmInfo.cpp
@@ -21,7 +21,7 @@
using namespace llvm::dwarf;
SPULinuxTargetAsmInfo::SPULinuxTargetAsmInfo(const SPUTargetMachine &TM) :
- SPUTargetAsmInfo<ELFTargetAsmInfo>(TM) {
+ SPUTargetAsmInfo<TargetAsmInfo>(TM) {
PCSymbol = ".";
CommentString = "#";
GlobalPrefix = "";
diff --git a/lib/Target/CellSPU/SPUTargetAsmInfo.h b/lib/Target/CellSPU/SPUTargetAsmInfo.h
index e773fa2..8217c16 100644
--- a/lib/Target/CellSPU/SPUTargetAsmInfo.h
+++ b/lib/Target/CellSPU/SPUTargetAsmInfo.h
@@ -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 @@
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 @@
}
};
- struct SPULinuxTargetAsmInfo : public SPUTargetAsmInfo<ELFTargetAsmInfo> {
+ struct SPULinuxTargetAsmInfo : public SPUTargetAsmInfo<TargetAsmInfo> {
explicit SPULinuxTargetAsmInfo(const SPUTargetMachine &TM);
};
} // namespace llvm
diff --git a/lib/Target/DarwinTargetAsmInfo.cpp b/lib/Target/DarwinTargetAsmInfo.cpp
index 24bc9a5..ff1f390 100644
--- a/lib/Target/DarwinTargetAsmInfo.cpp
+++ b/lib/Target/DarwinTargetAsmInfo.cpp
@@ -12,22 +12,10 @@
//
//===----------------------------------------------------------------------===//
-#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 = "_";
diff --git a/lib/Target/ELFTargetAsmInfo.cpp b/lib/Target/ELFTargetAsmInfo.cpp
index e3259bd..1b8ceb3 100644
--- a/lib/Target/ELFTargetAsmInfo.cpp
+++ b/lib/Target/ELFTargetAsmInfo.cpp
@@ -15,7 +15,3 @@
#include "llvm/Target/ELFTargetAsmInfo.h"
#include "llvm/ADT/SmallVector.h"
using namespace llvm;
-
-ELFTargetAsmInfo::ELFTargetAsmInfo(const TargetMachine &TM)
- : TargetAsmInfo(TM) {
-}
diff --git a/lib/Target/MSP430/MSP430TargetAsmInfo.cpp b/lib/Target/MSP430/MSP430TargetAsmInfo.cpp
index 43a521d..8f9f1a2 100644
--- a/lib/Target/MSP430/MSP430TargetAsmInfo.cpp
+++ b/lib/Target/MSP430/MSP430TargetAsmInfo.cpp
@@ -14,7 +14,6 @@
#include "MSP430TargetAsmInfo.h"
using namespace llvm;
-MSP430TargetAsmInfo::MSP430TargetAsmInfo(const TargetMachine &TM)
- : ELFTargetAsmInfo(TM) {
+MSP430TargetAsmInfo::MSP430TargetAsmInfo(const TargetMachine &TM) {
AlignmentIsInBytes = false;
}
diff --git a/lib/Target/MSP430/MSP430TargetAsmInfo.h b/lib/Target/MSP430/MSP430TargetAsmInfo.h
index 93ed04f..d6a20fb 100644
--- a/lib/Target/MSP430/MSP430TargetAsmInfo.h
+++ b/lib/Target/MSP430/MSP430TargetAsmInfo.h
@@ -14,10 +14,11 @@
#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);
};
diff --git a/lib/Target/Mips/MipsTargetAsmInfo.cpp b/lib/Target/Mips/MipsTargetAsmInfo.cpp
index d9a5369..96bb8a1 100644
--- a/lib/Target/Mips/MipsTargetAsmInfo.cpp
+++ b/lib/Target/Mips/MipsTargetAsmInfo.cpp
@@ -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";
diff --git a/lib/Target/Mips/MipsTargetAsmInfo.h b/lib/Target/Mips/MipsTargetAsmInfo.h
index e3cfadc..cbfb50e 100644
--- a/lib/Target/Mips/MipsTargetAsmInfo.h
+++ b/lib/Target/Mips/MipsTargetAsmInfo.h
@@ -14,13 +14,13 @@
#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);
};
diff --git a/lib/Target/PIC16/PIC16TargetAsmInfo.cpp b/lib/Target/PIC16/PIC16TargetAsmInfo.cpp
index 9912543..7a48a46 100644
--- a/lib/Target/PIC16/PIC16TargetAsmInfo.cpp
+++ b/lib/Target/PIC16/PIC16TargetAsmInfo.cpp
@@ -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";
diff --git a/lib/Target/PowerPC/PPCTargetAsmInfo.cpp b/lib/Target/PowerPC/PPCTargetAsmInfo.cpp
index 6322a2e..0696a90 100644
--- a/lib/Target/PowerPC/PPCTargetAsmInfo.cpp
+++ b/lib/Target/PowerPC/PPCTargetAsmInfo.cpp
@@ -33,7 +33,7 @@
}
PPCLinuxTargetAsmInfo::PPCLinuxTargetAsmInfo(const PPCTargetMachine &TM) :
- PPCTargetAsmInfo<ELFTargetAsmInfo>(TM) {
+ PPCTargetAsmInfo<TargetAsmInfo>(TM) {
CommentString = "#";
GlobalPrefix = "";
PrivateGlobalPrefix = ".L";
diff --git a/lib/Target/PowerPC/PPCTargetAsmInfo.h b/lib/Target/PowerPC/PPCTargetAsmInfo.h
index 79dabf4..34f4dd5 100644
--- a/lib/Target/PowerPC/PPCTargetAsmInfo.h
+++ b/lib/Target/PowerPC/PPCTargetAsmInfo.h
@@ -24,8 +24,7 @@
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 @@
explicit PPCDarwinTargetAsmInfo(const PPCTargetMachine &TM);
};
- struct PPCLinuxTargetAsmInfo : public PPCTargetAsmInfo<ELFTargetAsmInfo> {
+ struct PPCLinuxTargetAsmInfo : public PPCTargetAsmInfo<TargetAsmInfo> {
explicit PPCLinuxTargetAsmInfo(const PPCTargetMachine &TM);
};
diff --git a/lib/Target/Sparc/SparcTargetAsmInfo.cpp b/lib/Target/Sparc/SparcTargetAsmInfo.cpp
index 0ceaf11..6c57792 100644
--- a/lib/Target/Sparc/SparcTargetAsmInfo.cpp
+++ b/lib/Target/Sparc/SparcTargetAsmInfo.cpp
@@ -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.
diff --git a/lib/Target/Sparc/SparcTargetAsmInfo.h b/lib/Target/Sparc/SparcTargetAsmInfo.h
index ae646c3..4c1266a 100644
--- a/lib/Target/Sparc/SparcTargetAsmInfo.h
+++ b/lib/Target/Sparc/SparcTargetAsmInfo.h
@@ -14,14 +14,14 @@
#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);
};
diff --git a/lib/Target/SystemZ/SystemZTargetAsmInfo.cpp b/lib/Target/SystemZ/SystemZTargetAsmInfo.cpp
index 2f17676..25877f8 100644
--- a/lib/Target/SystemZ/SystemZTargetAsmInfo.cpp
+++ b/lib/Target/SystemZ/SystemZTargetAsmInfo.cpp
@@ -16,8 +16,7 @@
using namespace llvm;
-SystemZTargetAsmInfo::SystemZTargetAsmInfo(const SystemZTargetMachine &TM)
- : ELFTargetAsmInfo(TM) {
+SystemZTargetAsmInfo::SystemZTargetAsmInfo(const SystemZTargetMachine &TM) {
AlignmentIsInBytes = true;
PrivateGlobalPrefix = ".L";
diff --git a/lib/Target/SystemZ/SystemZTargetAsmInfo.h b/lib/Target/SystemZ/SystemZTargetAsmInfo.h
index 98b50d4..e7bf895 100644
--- a/lib/Target/SystemZ/SystemZTargetAsmInfo.h
+++ b/lib/Target/SystemZ/SystemZTargetAsmInfo.h
@@ -21,7 +21,7 @@
// Forward declaration.
class SystemZTargetMachine;
- struct SystemZTargetAsmInfo : public ELFTargetAsmInfo {
+ struct SystemZTargetAsmInfo : public TargetAsmInfo {
explicit SystemZTargetAsmInfo(const SystemZTargetMachine &TM);
};
diff --git a/lib/Target/TargetAsmInfo.cpp b/lib/Target/TargetAsmInfo.cpp
index 24a1145..65dac65 100644
--- a/lib/Target/TargetAsmInfo.cpp
+++ b/lib/Target/TargetAsmInfo.cpp
@@ -17,7 +17,7 @@
#include <cstring>
using namespace llvm;
-TargetAsmInfo::TargetAsmInfo(const TargetMachine &tm) : TM(tm) {
+TargetAsmInfo::TargetAsmInfo() {
ZeroFillDirective = 0;
NonexecutableStackDirective = 0;
NeedsSet = false;
diff --git a/lib/Target/X86/X86TargetAsmInfo.cpp b/lib/Target/X86/X86TargetAsmInfo.cpp
index 0735071..a8eaf5c 100644
--- a/lib/Target/X86/X86TargetAsmInfo.cpp
+++ b/lib/Target/X86/X86TargetAsmInfo.cpp
@@ -87,7 +87,7 @@
}
X86ELFTargetAsmInfo::X86ELFTargetAsmInfo(const X86TargetMachine &TM) :
- X86TargetAsmInfo<ELFTargetAsmInfo>(TM) {
+ X86TargetAsmInfo<TargetAsmInfo>(TM) {
PrivateGlobalPrefix = ".L";
WeakRefDirective = "\t.weak\t";
diff --git a/lib/Target/X86/X86TargetAsmInfo.h b/lib/Target/X86/X86TargetAsmInfo.h
index f0b23cc..92fa743 100644
--- a/lib/Target/X86/X86TargetAsmInfo.h
+++ b/lib/Target/X86/X86TargetAsmInfo.h
@@ -27,7 +27,7 @@
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 @@
explicit X86DarwinTargetAsmInfo(const X86TargetMachine &TM);
};
- struct X86ELFTargetAsmInfo : public X86TargetAsmInfo<ELFTargetAsmInfo> {
+ struct X86ELFTargetAsmInfo : public X86TargetAsmInfo<TargetAsmInfo> {
explicit X86ELFTargetAsmInfo(const X86TargetMachine &TM);
};
diff --git a/lib/Target/XCore/XCoreTargetAsmInfo.cpp b/lib/Target/XCore/XCoreTargetAsmInfo.cpp
index 48502d0..6f2dbbb 100644
--- a/lib/Target/XCore/XCoreTargetAsmInfo.cpp
+++ b/lib/Target/XCore/XCoreTargetAsmInfo.cpp
@@ -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";
diff --git a/lib/Target/XCore/XCoreTargetAsmInfo.h b/lib/Target/XCore/XCoreTargetAsmInfo.h
index f220815..d1ceb3f 100644
--- a/lib/Target/XCore/XCoreTargetAsmInfo.h
+++ b/lib/Target/XCore/XCoreTargetAsmInfo.h
@@ -14,11 +14,11 @@
#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);
};