diff options
Diffstat (limited to 'include/llvm')
-rw-r--r-- | include/llvm/CodeGen/AsmPrinter.h | 6 | ||||
-rw-r--r-- | include/llvm/CodeGen/DwarfWriter.h | 4 | ||||
-rw-r--r-- | include/llvm/CodeGen/GCMetadata.h | 2 | ||||
-rw-r--r-- | include/llvm/CodeGen/GCMetadataPrinter.h | 4 | ||||
-rw-r--r-- | include/llvm/MC/MCAsmInfo.h | 3 | ||||
-rw-r--r-- | include/llvm/MC/MCAsmInfoCOFF.h | 2 | ||||
-rw-r--r-- | include/llvm/MC/MCAsmInfoDarwin.h | 1 | ||||
-rw-r--r-- | include/llvm/MC/MCSection.h | 6 | ||||
-rw-r--r-- | include/llvm/MC/MCSectionELF.h | 6 | ||||
-rw-r--r-- | include/llvm/MC/MCSectionMachO.h | 2 | ||||
-rw-r--r-- | include/llvm/MC/MCStreamer.h | 4 | ||||
-rw-r--r-- | include/llvm/Target/COFFTargetAsmInfo.h | 8 | ||||
-rw-r--r-- | include/llvm/Target/DarwinTargetAsmInfo.h | 8 | ||||
-rw-r--r-- | include/llvm/Target/TargetAsmInfo.h | 10 | ||||
-rw-r--r-- | include/llvm/Target/TargetInstrInfo.h | 4 | ||||
-rw-r--r-- | include/llvm/Target/TargetLoweringObjectFile.h | 2 | ||||
-rw-r--r-- | include/llvm/Target/TargetMachine.h | 8 | ||||
-rw-r--r-- | include/llvm/Target/TargetRegistry.h | 28 |
18 files changed, 57 insertions, 51 deletions
diff --git a/include/llvm/CodeGen/AsmPrinter.h b/include/llvm/CodeGen/AsmPrinter.h index 11ae1e0..2778b41 100644 --- a/include/llvm/CodeGen/AsmPrinter.h +++ b/include/llvm/CodeGen/AsmPrinter.h @@ -48,7 +48,7 @@ namespace llvm { class MCStreamer; class DwarfWriter; class Mangler; - class TargetAsmInfo; + class MCAsmInfo; class TargetLoweringObjectFile; class Type; class formatted_raw_ostream; @@ -96,7 +96,7 @@ namespace llvm { /// Target Asm Printer information. /// - const TargetAsmInfo *TAI; + const MCAsmInfo *TAI; /// Target Register Information. /// @@ -149,7 +149,7 @@ namespace llvm { protected: explicit AsmPrinter(formatted_raw_ostream &o, TargetMachine &TM, - const TargetAsmInfo *T, bool V); + const MCAsmInfo *T, bool V); public: virtual ~AsmPrinter(); diff --git a/include/llvm/CodeGen/DwarfWriter.h b/include/llvm/CodeGen/DwarfWriter.h index 5c7ce05..9ae7668 100644 --- a/include/llvm/CodeGen/DwarfWriter.h +++ b/include/llvm/CodeGen/DwarfWriter.h @@ -34,7 +34,7 @@ class MachineInstr; class Value; class Module; class GlobalVariable; -class TargetAsmInfo; +class MCAsmInfo; class raw_ostream; class Instruction; class DICompileUnit; @@ -68,7 +68,7 @@ public: /// BeginModule - Emit all Dwarf sections that should come prior to the /// content. void BeginModule(Module *M, MachineModuleInfo *MMI, raw_ostream &OS, - AsmPrinter *A, const TargetAsmInfo *T); + AsmPrinter *A, const MCAsmInfo *T); /// EndModule - Emit all Dwarf sections that should come after the content. /// diff --git a/include/llvm/CodeGen/GCMetadata.h b/include/llvm/CodeGen/GCMetadata.h index e94aba3..04fd8be 100644 --- a/include/llvm/CodeGen/GCMetadata.h +++ b/include/llvm/CodeGen/GCMetadata.h @@ -42,7 +42,7 @@ namespace llvm { class AsmPrinter; class GCStrategy; class Constant; - class TargetAsmInfo; + class MCAsmInfo; namespace GC { diff --git a/include/llvm/CodeGen/GCMetadataPrinter.h b/include/llvm/CodeGen/GCMetadataPrinter.h index b693b1b..a3ffee9 100644 --- a/include/llvm/CodeGen/GCMetadataPrinter.h +++ b/include/llvm/CodeGen/GCMetadataPrinter.h @@ -63,10 +63,10 @@ namespace llvm { /// beginAssembly/finishAssembly - Emit module metadata as assembly code. virtual void beginAssembly(raw_ostream &OS, AsmPrinter &AP, - const TargetAsmInfo &TAI); + const MCAsmInfo &TAI); virtual void finishAssembly(raw_ostream &OS, AsmPrinter &AP, - const TargetAsmInfo &TAI); + const MCAsmInfo &TAI); virtual ~GCMetadataPrinter(); }; diff --git a/include/llvm/MC/MCAsmInfo.h b/include/llvm/MC/MCAsmInfo.h new file mode 100644 index 0000000..fcce7a6 --- /dev/null +++ b/include/llvm/MC/MCAsmInfo.h @@ -0,0 +1,3 @@ + +#include "llvm/Target/TargetAsmInfo.h" + diff --git a/include/llvm/MC/MCAsmInfoCOFF.h b/include/llvm/MC/MCAsmInfoCOFF.h new file mode 100644 index 0000000..73a0155 --- /dev/null +++ b/include/llvm/MC/MCAsmInfoCOFF.h @@ -0,0 +1,2 @@ +#include "llvm/Target/COFFTargetAsmInfo.h" + diff --git a/include/llvm/MC/MCAsmInfoDarwin.h b/include/llvm/MC/MCAsmInfoDarwin.h new file mode 100644 index 0000000..122adb2 --- /dev/null +++ b/include/llvm/MC/MCAsmInfoDarwin.h @@ -0,0 +1 @@ +#include "llvm/Target/DarwinTargetAsmInfo.h" diff --git a/include/llvm/MC/MCSection.h b/include/llvm/MC/MCSection.h index 6a1f9d7..56784d3 100644 --- a/include/llvm/MC/MCSection.h +++ b/include/llvm/MC/MCSection.h @@ -20,7 +20,7 @@ namespace llvm { class MCContext; - class TargetAsmInfo; + class MCAsmInfo; class raw_ostream; /// MCSection - Instances of this class represent a uniqued identifier for a @@ -37,7 +37,7 @@ namespace llvm { SectionKind getKind() const { return Kind; } - virtual void PrintSwitchToSection(const TargetAsmInfo &TAI, + virtual void PrintSwitchToSection(const MCAsmInfo &TAI, raw_ostream &OS) const = 0; }; @@ -62,7 +62,7 @@ namespace llvm { const std::string &getName() const { return Name; } bool isDirective() const { return IsDirective; } - virtual void PrintSwitchToSection(const TargetAsmInfo &TAI, + virtual void PrintSwitchToSection(const MCAsmInfo &TAI, raw_ostream &OS) const; }; diff --git a/include/llvm/MC/MCSectionELF.h b/include/llvm/MC/MCSectionELF.h index 8e70e36..05cda52 100644 --- a/include/llvm/MC/MCSectionELF.h +++ b/include/llvm/MC/MCSectionELF.h @@ -48,7 +48,7 @@ public: /// ShouldOmitSectionDirective - Decides whether a '.section' directive /// should be printed before the section name bool ShouldOmitSectionDirective(const char *Name, - const TargetAsmInfo &TAI) const; + const MCAsmInfo &TAI) const; /// ShouldPrintSectionType - Only prints the section type if supported bool ShouldPrintSectionType(unsigned Ty) const; @@ -171,7 +171,7 @@ public: unsigned getType() const { return Type; } unsigned getFlags() const { return Flags; } - virtual void PrintSwitchToSection(const TargetAsmInfo &TAI, + virtual void PrintSwitchToSection(const MCAsmInfo &TAI, raw_ostream &OS) const; @@ -179,7 +179,7 @@ public: /// MCSectionELF subclasses with target specific section flags should /// implement this method if they end up adding letters to the attributes /// list. - virtual void PrintTargetSpecificSectionFlags(const TargetAsmInfo &TAI, + virtual void PrintTargetSpecificSectionFlags(const MCAsmInfo &TAI, raw_ostream &OS) const { } diff --git a/include/llvm/MC/MCSectionMachO.h b/include/llvm/MC/MCSectionMachO.h index 04b2afa..9279e29 100644 --- a/include/llvm/MC/MCSectionMachO.h +++ b/include/llvm/MC/MCSectionMachO.h @@ -166,7 +166,7 @@ public: unsigned &TAA, // Out. unsigned &StubSize); // Out. - virtual void PrintSwitchToSection(const TargetAsmInfo &TAI, + virtual void PrintSwitchToSection(const MCAsmInfo &TAI, raw_ostream &OS) const; }; diff --git a/include/llvm/MC/MCStreamer.h b/include/llvm/MC/MCStreamer.h index 4d55990..0018873 100644 --- a/include/llvm/MC/MCStreamer.h +++ b/include/llvm/MC/MCStreamer.h @@ -25,7 +25,7 @@ namespace llvm { class MCSymbol; class StringRef; class raw_ostream; - class TargetAsmInfo; + class MCAsmInfo; /// MCStreamer - Streaming machine code generation interface. This interface /// is intended to provide a programatic interface that is very similar to the @@ -241,7 +241,7 @@ namespace llvm { /// /// \arg AP - If given, an AsmPrinter to use for printing instructions. MCStreamer *createAsmStreamer(MCContext &Ctx, raw_ostream &OS, - const TargetAsmInfo &TAI, AsmPrinter *AP = 0); + const MCAsmInfo &TAI, AsmPrinter *AP = 0); // FIXME: These two may end up getting rolled into a single // createObjectStreamer interface, which implements the assembler backend, and diff --git a/include/llvm/Target/COFFTargetAsmInfo.h b/include/llvm/Target/COFFTargetAsmInfo.h index fd9fb45..b5e3d70 100644 --- a/include/llvm/Target/COFFTargetAsmInfo.h +++ b/include/llvm/Target/COFFTargetAsmInfo.h @@ -1,4 +1,4 @@ -//===-- COFFTargetAsmInfo.h - COFF asm properties ---------------*- C++ -*-===// +//===-- MCAsmInfoCOFF.h - COFF asm properties -------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -10,12 +10,12 @@ #ifndef LLVM_COFF_TARGET_ASM_INFO_H #define LLVM_COFF_TARGET_ASM_INFO_H -#include "llvm/Target/TargetAsmInfo.h" +#include "llvm/MC/MCAsmInfo.h" namespace llvm { - class COFFTargetAsmInfo : public TargetAsmInfo { + class COFFMCAsmInfo : public MCAsmInfo { protected: - explicit COFFTargetAsmInfo(); + explicit COFFMCAsmInfo(); }; } diff --git a/include/llvm/Target/DarwinTargetAsmInfo.h b/include/llvm/Target/DarwinTargetAsmInfo.h index 0834390..a91a0dd 100644 --- a/include/llvm/Target/DarwinTargetAsmInfo.h +++ b/include/llvm/Target/DarwinTargetAsmInfo.h @@ -1,4 +1,4 @@ -//===---- DarwinTargetAsmInfo.h - Darwin asm properties ---------*- C++ -*-===// +//===---- DarwinMCAsmInfo.h - Darwin asm properties -------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -15,7 +15,7 @@ #ifndef LLVM_DARWIN_TARGET_ASM_INFO_H #define LLVM_DARWIN_TARGET_ASM_INFO_H -#include "llvm/Target/TargetAsmInfo.h" +#include "llvm/MC/MCAsmInfo.h" namespace llvm { class GlobalValue; @@ -23,8 +23,8 @@ namespace llvm { class Type; class Mangler; - struct DarwinTargetAsmInfo : public TargetAsmInfo { - explicit DarwinTargetAsmInfo(); + struct DarwinMCAsmInfo : public MCAsmInfo { + explicit DarwinMCAsmInfo(); }; } diff --git a/include/llvm/Target/TargetAsmInfo.h b/include/llvm/Target/TargetAsmInfo.h index cb0e346..4f8d92b 100644 --- a/include/llvm/Target/TargetAsmInfo.h +++ b/include/llvm/Target/TargetAsmInfo.h @@ -1,4 +1,4 @@ -//===-- llvm/Target/TargetAsmInfo.h - Asm info ------------------*- C++ -*-===// +//===-- llvm/MC/MCAsmInfo.h - Asm info --------------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -23,11 +23,11 @@ namespace llvm { template <typename T> class SmallVectorImpl; - /// TargetAsmInfo - This class is intended to be used as a base class for asm + /// MCAsmInfo - This class is intended to be used as a base class for asm /// properties and features specific to the target. namespace ExceptionHandling { enum ExceptionsType { None, Dwarf, SjLj }; } - class TargetAsmInfo { + class MCAsmInfo { protected: //===------------------------------------------------------------------===// // Properties to be set by the target writer, used to configure asm printer. @@ -310,8 +310,8 @@ namespace llvm { const char *const *AsmTransCBE; // Defaults to empty public: - explicit TargetAsmInfo(); - virtual ~TargetAsmInfo(); + explicit MCAsmInfo(); + virtual ~MCAsmInfo(); /// getSLEB128Size - Compute the number of bytes required for a signed /// leb128 value. diff --git a/include/llvm/Target/TargetInstrInfo.h b/include/llvm/Target/TargetInstrInfo.h index f8a01ab..402f7a3 100644 --- a/include/llvm/Target/TargetInstrInfo.h +++ b/include/llvm/Target/TargetInstrInfo.h @@ -19,7 +19,7 @@ namespace llvm { -class TargetAsmInfo; +class MCAsmInfo; class TargetRegisterClass; class TargetRegisterInfo; class LiveVariables; @@ -464,7 +464,7 @@ public: /// Measure the specified inline asm to determine an approximation of its /// length. virtual unsigned getInlineAsmLength(const char *Str, - const TargetAsmInfo &TAI) const; + const MCAsmInfo &TAI) const; }; /// TargetInstrInfoImpl - This is the default implementation of diff --git a/include/llvm/Target/TargetLoweringObjectFile.h b/include/llvm/Target/TargetLoweringObjectFile.h index 2264d36..7cb7b98 100644 --- a/include/llvm/Target/TargetLoweringObjectFile.h +++ b/include/llvm/Target/TargetLoweringObjectFile.h @@ -25,7 +25,7 @@ namespace llvm { class GlobalValue; class StringRef; class TargetMachine; - class TargetAsmInfo; + class MCAsmInfo; class TargetLoweringObjectFile { MCContext *Ctx; diff --git a/include/llvm/Target/TargetMachine.h b/include/llvm/Target/TargetMachine.h index e5ea27f..9614780 100644 --- a/include/llvm/Target/TargetMachine.h +++ b/include/llvm/Target/TargetMachine.h @@ -21,7 +21,7 @@ namespace llvm { class Target; -class TargetAsmInfo; +class MCAsmInfo; class TargetData; class TargetSubtarget; class TargetInstrInfo; @@ -102,7 +102,7 @@ protected: // Can only create subclasses. /// AsmInfo - Contains target specific asm information. /// - const TargetAsmInfo *AsmInfo; + const MCAsmInfo *AsmInfo; public: virtual ~TargetMachine(); @@ -120,9 +120,9 @@ public: virtual TargetLowering *getTargetLowering() const { return 0; } virtual const TargetData *getTargetData() const { return 0; } - /// getTargetAsmInfo - Return target specific asm information. + /// getMCAsmInfo - Return target specific asm information. /// - const TargetAsmInfo *getTargetAsmInfo() const { return AsmInfo; } + const MCAsmInfo *getMCAsmInfo() const { return AsmInfo; } /// getSubtarget - This method returns a pointer to the specified type of /// TargetSubtarget. In debug builds, it verifies that the object being diff --git a/include/llvm/Target/TargetRegistry.h b/include/llvm/Target/TargetRegistry.h index ebdb36c..8c9e357 100644 --- a/include/llvm/Target/TargetRegistry.h +++ b/include/llvm/Target/TargetRegistry.h @@ -27,7 +27,7 @@ namespace llvm { class AsmPrinter; class MCAsmParser; class Module; - class TargetAsmInfo; + class MCAsmInfo; class TargetAsmParser; class TargetMachine; class formatted_raw_ostream; @@ -46,14 +46,14 @@ namespace llvm { typedef unsigned (*TripleMatchQualityFnTy)(const std::string &TT); - typedef const TargetAsmInfo *(*AsmInfoCtorFnTy)(const Target &T, - const StringRef &TT); + typedef const MCAsmInfo *(*AsmInfoCtorFnTy)(const Target &T, + const StringRef &TT); typedef TargetMachine *(*TargetMachineCtorTy)(const Target &T, const std::string &TT, const std::string &Features); typedef AsmPrinter *(*AsmPrinterCtorTy)(formatted_raw_ostream &OS, TargetMachine &TM, - const TargetAsmInfo *TAI, + const MCAsmInfo *TAI, bool VerboseAsm); typedef TargetAsmParser *(*AsmParserCtorTy)(const Target &T, MCAsmParser &P); @@ -111,14 +111,14 @@ namespace llvm { bool hasAsmParser() const { return AsmParserCtorFn != 0; } - /// createAsmInfo - Create a TargetAsmInfo implementation for the specified + /// createAsmInfo - Create a MCAsmInfo implementation for the specified /// target triple. /// /// \arg Triple - This argument is used to determine the target machine /// feature set; it should always be provided. Generally this should be /// either the target triple from the module, or the target triple of the /// host if that does not exist. - const TargetAsmInfo *createAsmInfo(const StringRef &Triple) const { + const MCAsmInfo *createAsmInfo(const StringRef &Triple) const { if (!AsmInfoCtorFn) return 0; return AsmInfoCtorFn(*this, Triple); @@ -140,7 +140,7 @@ namespace llvm { /// createAsmPrinter - Create a target specific assembly printer pass. AsmPrinter *createAsmPrinter(formatted_raw_ostream &OS, TargetMachine &TM, - const TargetAsmInfo *TAI, bool Verbose) const { + const MCAsmInfo *TAI, bool Verbose) const { if (!AsmPrinterCtorFn) return 0; return AsmPrinterCtorFn(OS, TM, TAI, Verbose); @@ -243,7 +243,7 @@ namespace llvm { Target::TripleMatchQualityFnTy TQualityFn, bool HasJIT = false); - /// RegisterAsmInfo - Register a TargetAsmInfo implementation for the + /// RegisterAsmInfo - Register a MCAsmInfo implementation for the /// given target. /// /// Clients are responsible for ensuring that registration doesn't occur @@ -251,7 +251,7 @@ namespace llvm { /// this is done by initializing all targets at program startup. /// /// @param T - The target being registered. - /// @param Fn - A function to construct a TargetAsmInfo for the target. + /// @param Fn - A function to construct a MCAsmInfo for the target. static void RegisterAsmInfo(Target &T, Target::AsmInfoCtorFnTy Fn) { // Ignore duplicate registration. if (!T.AsmInfoCtorFn) @@ -340,16 +340,16 @@ namespace llvm { /// /// extern "C" void LLVMInitializeFooTarget() { /// extern Target TheFooTarget; - /// RegisterAsmInfo<FooTargetAsmInfo> X(TheFooTarget); + /// RegisterAsmInfo<FooMCAsmInfo> X(TheFooTarget); /// } - template<class TargetAsmInfoImpl> + template<class MCAsmInfoImpl> struct RegisterAsmInfo { RegisterAsmInfo(Target &T) { TargetRegistry::RegisterAsmInfo(T, &Allocator); } private: - static const TargetAsmInfo *Allocator(const Target &T, const StringRef &TT){ - return new TargetAsmInfoImpl(T, TT); + static const MCAsmInfo *Allocator(const Target &T, const StringRef &TT) { + return new MCAsmInfoImpl(T, TT); } }; @@ -406,7 +406,7 @@ namespace llvm { private: static AsmPrinter *Allocator(formatted_raw_ostream &OS, TargetMachine &TM, - const TargetAsmInfo *TAI, bool Verbose) { + const MCAsmInfo *TAI, bool Verbose) { return new AsmPrinterImpl(OS, TM, TAI, Verbose); } }; |