forked from OSchip/llvm-project
remove TargetAsmInfo::TM, which is now dead. The basic TAI class now
no longer depends on TM! llvm-svn: 77863
This commit is contained in:
parent
44616ce317
commit
b25afe081c
|
@ -15,7 +15,7 @@
|
|||
namespace llvm {
|
||||
class COFFTargetAsmInfo : public TargetAsmInfo {
|
||||
protected:
|
||||
explicit COFFTargetAsmInfo(const TargetMachine &TM);
|
||||
explicit COFFTargetAsmInfo();
|
||||
|
||||
};
|
||||
}
|
||||
|
|
|
@ -24,7 +24,7 @@ namespace llvm {
|
|||
class Mangler;
|
||||
|
||||
struct DarwinTargetAsmInfo : public TargetAsmInfo {
|
||||
explicit DarwinTargetAsmInfo(const TargetMachine &TM);
|
||||
explicit DarwinTargetAsmInfo();
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -19,9 +19,7 @@
|
|||
|
||||
namespace llvm {
|
||||
|
||||
struct ELFTargetAsmInfo : public TargetAsmInfo {
|
||||
ELFTargetAsmInfo(const TargetMachine &TM);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -22,15 +22,11 @@
|
|||
|
||||
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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
};
|
||||
|
||||
|
|
|
@ -16,8 +16,7 @@
|
|||
|
||||
using namespace llvm;
|
||||
|
||||
AlphaTargetAsmInfo::AlphaTargetAsmInfo(const AlphaTargetMachine &TM)
|
||||
: TargetAsmInfo(TM) {
|
||||
AlphaTargetAsmInfo::AlphaTargetAsmInfo(const AlphaTargetMachine &TM) {
|
||||
AlignmentIsInBytes = false;
|
||||
PrivateGlobalPrefix = "$";
|
||||
JumpTableDirective = ".gprel32";
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 = "";
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 = "_";
|
||||
|
|
|
@ -15,7 +15,3 @@
|
|||
#include "llvm/Target/ELFTargetAsmInfo.h"
|
||||
#include "llvm/ADT/SmallVector.h"
|
||||
using namespace llvm;
|
||||
|
||||
ELFTargetAsmInfo::ELFTargetAsmInfo(const TargetMachine &TM)
|
||||
: TargetAsmInfo(TM) {
|
||||
}
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
#include "MSP430TargetAsmInfo.h"
|
||||
using namespace llvm;
|
||||
|
||||
MSP430TargetAsmInfo::MSP430TargetAsmInfo(const TargetMachine &TM)
|
||||
: ELFTargetAsmInfo(TM) {
|
||||
MSP430TargetAsmInfo::MSP430TargetAsmInfo(const TargetMachine &TM) {
|
||||
AlignmentIsInBytes = false;
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
};
|
||||
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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);
|
||||
};
|
||||
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -33,7 +33,7 @@ PPCDarwinTargetAsmInfo::PPCDarwinTargetAsmInfo(const PPCTargetMachine &TM) :
|
|||
}
|
||||
|
||||
PPCLinuxTargetAsmInfo::PPCLinuxTargetAsmInfo(const PPCTargetMachine &TM) :
|
||||
PPCTargetAsmInfo<ELFTargetAsmInfo>(TM) {
|
||||
PPCTargetAsmInfo<TargetAsmInfo>(TM) {
|
||||
CommentString = "#";
|
||||
GlobalPrefix = "";
|
||||
PrivateGlobalPrefix = ".L";
|
||||
|
|
|
@ -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);
|
||||
};
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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);
|
||||
};
|
||||
|
||||
|
|
|
@ -16,8 +16,7 @@
|
|||
|
||||
using namespace llvm;
|
||||
|
||||
SystemZTargetAsmInfo::SystemZTargetAsmInfo(const SystemZTargetMachine &TM)
|
||||
: ELFTargetAsmInfo(TM) {
|
||||
SystemZTargetAsmInfo::SystemZTargetAsmInfo(const SystemZTargetMachine &TM) {
|
||||
AlignmentIsInBytes = true;
|
||||
|
||||
PrivateGlobalPrefix = ".L";
|
||||
|
|
|
@ -21,7 +21,7 @@ namespace llvm {
|
|||
// Forward declaration.
|
||||
class SystemZTargetMachine;
|
||||
|
||||
struct SystemZTargetAsmInfo : public ELFTargetAsmInfo {
|
||||
struct SystemZTargetAsmInfo : public TargetAsmInfo {
|
||||
explicit SystemZTargetAsmInfo(const SystemZTargetMachine &TM);
|
||||
};
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
#include <cstring>
|
||||
using namespace llvm;
|
||||
|
||||
TargetAsmInfo::TargetAsmInfo(const TargetMachine &tm) : TM(tm) {
|
||||
TargetAsmInfo::TargetAsmInfo() {
|
||||
ZeroFillDirective = 0;
|
||||
NonexecutableStackDirective = 0;
|
||||
NeedsSet = false;
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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);
|
||||
};
|
||||
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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);
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue