namespace llvm {
class COFFTargetAsmInfo : public TargetAsmInfo {
protected:
- explicit COFFTargetAsmInfo(const TargetMachine &TM);
+ explicit COFFTargetAsmInfo();
};
}
class Mangler;
struct DarwinTargetAsmInfo : public TargetAsmInfo {
- explicit DarwinTargetAsmInfo(const TargetMachine &TM);
+ explicit DarwinTargetAsmInfo();
};
}
namespace llvm {
- struct ELFTargetAsmInfo : public TargetAsmInfo {
- ELFTargetAsmInfo(const TargetMachine &TM);
- };
+
}
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.
//
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
}
ARMELFTargetAsmInfo::ARMELFTargetAsmInfo(const ARMBaseTargetMachine &TM):
- ARMTargetAsmInfo<ELFTargetAsmInfo>(TM) {
+ ARMTargetAsmInfo<TargetAsmInfo>(TM) {
Subtarget = &TM.getSubtarget<ARMSubtarget>();
NeedsSet = false;
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;
explicit ARMDarwinTargetAsmInfo(const ARMBaseTargetMachine &TM);
};
- struct ARMELFTargetAsmInfo : public ARMTargetAsmInfo<ELFTargetAsmInfo> {
+ struct ARMELFTargetAsmInfo : public ARMTargetAsmInfo<TargetAsmInfo> {
explicit ARMELFTargetAsmInfo(const ARMBaseTargetMachine &TM);
};
using namespace llvm;
-AlphaTargetAsmInfo::AlphaTargetAsmInfo(const AlphaTargetMachine &TM)
- : TargetAsmInfo(TM) {
+AlphaTargetAsmInfo::AlphaTargetAsmInfo(const AlphaTargetMachine &TM) {
AlignmentIsInBytes = false;
PrivateGlobalPrefix = "$";
JumpTableDirective = ".gprel32";
#include "llvm/ADT/SmallVector.h"
using namespace llvm;
-COFFTargetAsmInfo::COFFTargetAsmInfo(const TargetMachine &TM)
- : TargetAsmInfo(TM) {
-
+COFFTargetAsmInfo::COFFTargetAsmInfo() {
GlobalPrefix = "_";
LCOMMDirective = "\t.lcomm\t";
COMMDirectiveTakesAlignment = false;
using namespace llvm::dwarf;
SPULinuxTargetAsmInfo::SPULinuxTargetAsmInfo(const SPUTargetMachine &TM) :
- SPUTargetAsmInfo<ELFTargetAsmInfo>(TM) {
+ SPUTargetAsmInfo<TargetAsmInfo>(TM) {
PCSymbol = ".";
CommentString = "#";
GlobalPrefix = "";
#define SPUTARGETASMINFO_H
#include "llvm/Target/TargetAsmInfo.h"
-#include "llvm/Target/ELFTargetAsmInfo.h"
#include "SPUTargetMachine.h"
#include "SPUSubtarget.h"
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>(); */
}
};
- struct SPULinuxTargetAsmInfo : public SPUTargetAsmInfo<ELFTargetAsmInfo> {
+ struct SPULinuxTargetAsmInfo : public SPUTargetAsmInfo<TargetAsmInfo> {
explicit SPULinuxTargetAsmInfo(const SPUTargetMachine &TM);
};
} // namespace llvm
//
//===----------------------------------------------------------------------===//
-#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 = "_";
#include "llvm/Target/ELFTargetAsmInfo.h"
#include "llvm/ADT/SmallVector.h"
using namespace llvm;
-
-ELFTargetAsmInfo::ELFTargetAsmInfo(const TargetMachine &TM)
- : TargetAsmInfo(TM) {
-}
#include "MSP430TargetAsmInfo.h"
using namespace llvm;
-MSP430TargetAsmInfo::MSP430TargetAsmInfo(const TargetMachine &TM)
- : ELFTargetAsmInfo(TM) {
+MSP430TargetAsmInfo::MSP430TargetAsmInfo(const TargetMachine &TM) {
AlignmentIsInBytes = false;
}
#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);
};
#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";
#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);
};
using namespace llvm;
PIC16TargetAsmInfo::
-PIC16TargetAsmInfo(const PIC16TargetMachine &TM)
- : TargetAsmInfo(TM) {
+PIC16TargetAsmInfo(const PIC16TargetMachine &TM) {
CommentString = ";";
GlobalPrefix = PAN::getTagName(PAN::PREFIX_SYMBOL);
GlobalDirective = "\tglobal\t";
}
PPCLinuxTargetAsmInfo::PPCLinuxTargetAsmInfo(const PPCTargetMachine &TM) :
- PPCTargetAsmInfo<ELFTargetAsmInfo>(TM) {
+ PPCTargetAsmInfo<TargetAsmInfo>(TM) {
CommentString = "#";
GlobalPrefix = "";
PrivateGlobalPrefix = ".L";
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();
explicit PPCDarwinTargetAsmInfo(const PPCTargetMachine &TM);
};
- struct PPCLinuxTargetAsmInfo : public PPCTargetAsmInfo<ELFTargetAsmInfo> {
+ struct PPCLinuxTargetAsmInfo : public PPCTargetAsmInfo<TargetAsmInfo> {
explicit PPCLinuxTargetAsmInfo(const PPCTargetMachine &TM);
};
#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.
#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);
};
using namespace llvm;
-SystemZTargetAsmInfo::SystemZTargetAsmInfo(const SystemZTargetMachine &TM)
- : ELFTargetAsmInfo(TM) {
+SystemZTargetAsmInfo::SystemZTargetAsmInfo(const SystemZTargetMachine &TM) {
AlignmentIsInBytes = true;
PrivateGlobalPrefix = ".L";
// Forward declaration.
class SystemZTargetMachine;
- struct SystemZTargetAsmInfo : public ELFTargetAsmInfo {
+ struct SystemZTargetAsmInfo : public TargetAsmInfo {
explicit SystemZTargetAsmInfo(const SystemZTargetMachine &TM);
};
#include <cstring>
using namespace llvm;
-TargetAsmInfo::TargetAsmInfo(const TargetMachine &tm) : TM(tm) {
+TargetAsmInfo::TargetAsmInfo() {
ZeroFillDirective = 0;
NonexecutableStackDirective = 0;
NeedsSet = false;
}
X86ELFTargetAsmInfo::X86ELFTargetAsmInfo(const X86TargetMachine &TM) :
- X86TargetAsmInfo<ELFTargetAsmInfo>(TM) {
+ X86TargetAsmInfo<TargetAsmInfo>(TM) {
PrivateGlobalPrefix = ".L";
WeakRefDirective = "\t.weak\t";
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();
}
explicit X86DarwinTargetAsmInfo(const X86TargetMachine &TM);
};
- struct X86ELFTargetAsmInfo : public X86TargetAsmInfo<ELFTargetAsmInfo> {
+ struct X86ELFTargetAsmInfo : public X86TargetAsmInfo<TargetAsmInfo> {
explicit X86ELFTargetAsmInfo(const X86TargetMachine &TM);
};
#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";
#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);
};