clang-format TargetRegistry.h. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238255 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola 2015-05-26 21:18:29 +00:00
parent 90b5eb2319
commit 116e31ffbe

View File

@ -92,8 +92,7 @@ namespace llvm {
typedef MCAsmInfo *(*MCAsmInfoCtorFnTy)(const MCRegisterInfo &MRI, typedef MCAsmInfo *(*MCAsmInfoCtorFnTy)(const MCRegisterInfo &MRI,
StringRef TT); StringRef TT);
typedef MCCodeGenInfo *(*MCCodeGenInfoCtorFnTy)(StringRef TT, typedef MCCodeGenInfo *(*MCCodeGenInfoCtorFnTy)(StringRef TT, Reloc::Model RM,
Reloc::Model RM,
CodeModel::Model CM, CodeModel::Model CM,
CodeGenOpt::Level OL); CodeGenOpt::Level OL);
typedef MCInstrInfo *(*MCInstrInfoCtorFnTy)(void); typedef MCInstrInfo *(*MCInstrInfoCtorFnTy)(void);
@ -102,13 +101,9 @@ namespace llvm {
typedef MCSubtargetInfo *(*MCSubtargetInfoCtorFnTy)(StringRef TT, typedef MCSubtargetInfo *(*MCSubtargetInfoCtorFnTy)(StringRef TT,
StringRef CPU, StringRef CPU,
StringRef Features); StringRef Features);
typedef TargetMachine *(*TargetMachineCtorTy)(const Target &T, typedef TargetMachine *(*TargetMachineCtorTy)(
StringRef TT, const Target &T, StringRef TT, StringRef CPU, StringRef Features,
StringRef CPU, const TargetOptions &Options, Reloc::Model RM, CodeModel::Model CM,
StringRef Features,
const TargetOptions &Options,
Reloc::Model RM,
CodeModel::Model CM,
CodeGenOpt::Level OL); CodeGenOpt::Level OL);
// If it weren't for layering issues (this header is in llvm/Support, but // If it weren't for layering issues (this header is in llvm/Support, but
// depends on MC?) this should take the Streamer by value rather than rvalue // depends on MC?) this should take the Streamer by value rather than rvalue
@ -117,12 +112,9 @@ namespace llvm {
TargetMachine &TM, std::unique_ptr<MCStreamer> &&Streamer); TargetMachine &TM, std::unique_ptr<MCStreamer> &&Streamer);
typedef MCAsmBackend *(*MCAsmBackendCtorTy)(const Target &T, typedef MCAsmBackend *(*MCAsmBackendCtorTy)(const Target &T,
const MCRegisterInfo &MRI, const MCRegisterInfo &MRI,
StringRef TT, StringRef TT, StringRef CPU);
StringRef CPU);
typedef MCTargetAsmParser *(*MCAsmParserCtorTy)( typedef MCTargetAsmParser *(*MCAsmParserCtorTy)(
MCSubtargetInfo &STI, MCSubtargetInfo &STI, MCAsmParser &P, const MCInstrInfo &MII,
MCAsmParser &P,
const MCInstrInfo &MII,
const MCTargetOptions &Options); const MCTargetOptions &Options);
typedef MCDisassembler *(*MCDisassemblerCtorTy)(const Target &T, typedef MCDisassembler *(*MCDisassemblerCtorTy)(const Target &T,
const MCSubtargetInfo &STI, const MCSubtargetInfo &STI,
@ -140,9 +132,11 @@ namespace llvm {
raw_pwrite_stream &OS, raw_pwrite_stream &OS,
MCCodeEmitter *Emitter, MCCodeEmitter *Emitter,
bool RelaxAll); bool RelaxAll);
typedef MCStreamer *(*MachOStreamerCtorTy)( typedef MCStreamer *(*MachOStreamerCtorTy)(MCContext &Ctx, MCAsmBackend &TAB,
MCContext &Ctx, MCAsmBackend &TAB, raw_pwrite_stream &OS, raw_pwrite_stream &OS,
MCCodeEmitter *Emitter, bool RelaxAll, bool DWARFMustBeAtTheEnd); MCCodeEmitter *Emitter,
bool RelaxAll,
bool DWARFMustBeAtTheEnd);
typedef MCStreamer *(*COFFStreamerCtorTy)(MCContext &Ctx, MCAsmBackend &TAB, typedef MCStreamer *(*COFFStreamerCtorTy)(MCContext &Ctx, MCAsmBackend &TAB,
raw_pwrite_stream &OS, raw_pwrite_stream &OS,
MCCodeEmitter *Emitter, MCCodeEmitter *Emitter,
@ -361,22 +355,23 @@ namespace llvm {
/// feature set; it should always be provided. Generally this should be /// feature set; it should always be provided. Generally this should be
/// either the target triple from the module, or the target triple of the /// either the target triple from the module, or the target triple of the
/// host if that does not exist. /// host if that does not exist.
TargetMachine *createTargetMachine(StringRef Triple, StringRef CPU, TargetMachine *
StringRef Features, const TargetOptions &Options, createTargetMachine(StringRef Triple, StringRef CPU, StringRef Features,
const TargetOptions &Options,
Reloc::Model RM = Reloc::Default, Reloc::Model RM = Reloc::Default,
CodeModel::Model CM = CodeModel::Default, CodeModel::Model CM = CodeModel::Default,
CodeGenOpt::Level OL = CodeGenOpt::Default) const { CodeGenOpt::Level OL = CodeGenOpt::Default) const {
if (!TargetMachineCtorFn) if (!TargetMachineCtorFn)
return nullptr; return nullptr;
return TargetMachineCtorFn(*this, Triple, CPU, Features, Options, return TargetMachineCtorFn(*this, Triple, CPU, Features, Options, RM, CM,
RM, CM, OL); OL);
} }
/// createMCAsmBackend - Create a target specific assembly parser. /// createMCAsmBackend - Create a target specific assembly parser.
/// ///
/// \param Triple The target triple string. /// \param Triple The target triple string.
MCAsmBackend *createMCAsmBackend(const MCRegisterInfo &MRI, MCAsmBackend *createMCAsmBackend(const MCRegisterInfo &MRI, StringRef Triple,
StringRef Triple, StringRef CPU) const { StringRef CPU) const {
if (!MCAsmBackendCtorFn) if (!MCAsmBackendCtorFn)
return nullptr; return nullptr;
return MCAsmBackendCtorFn(*this, MRI, Triple, CPU); return MCAsmBackendCtorFn(*this, MRI, Triple, CPU);
@ -386,8 +381,7 @@ namespace llvm {
/// ///
/// \param Parser The target independent parser implementation to use for /// \param Parser The target independent parser implementation to use for
/// parsing and lexing. /// parsing and lexing.
MCTargetAsmParser *createMCAsmParser( MCTargetAsmParser *createMCAsmParser(MCSubtargetInfo &STI,
MCSubtargetInfo &STI,
MCAsmParser &Parser, MCAsmParser &Parser,
const MCInstrInfo &MII, const MCInstrInfo &MII,
const MCTargetOptions &Options) const { const MCTargetOptions &Options) const {
@ -421,7 +415,6 @@ namespace llvm {
return MCInstPrinterCtorFn(T, SyntaxVariant, MAI, MII, MRI); return MCInstPrinterCtorFn(T, SyntaxVariant, MAI, MII, MRI);
} }
/// createMCCodeEmitter - Create a target specific code emitter. /// createMCCodeEmitter - Create a target specific code emitter.
MCCodeEmitter *createMCCodeEmitter(const MCInstrInfo &II, MCCodeEmitter *createMCCodeEmitter(const MCInstrInfo &II,
const MCRegisterInfo &MRI, const MCRegisterInfo &MRI,
@ -442,8 +435,7 @@ namespace llvm {
MCStreamer *createMCObjectStreamer(const Triple &T, MCContext &Ctx, MCStreamer *createMCObjectStreamer(const Triple &T, MCContext &Ctx,
MCAsmBackend &TAB, raw_pwrite_stream &OS, MCAsmBackend &TAB, raw_pwrite_stream &OS,
MCCodeEmitter *Emitter, MCCodeEmitter *Emitter,
const MCSubtargetInfo &STI, const MCSubtargetInfo &STI, bool RelaxAll,
bool RelaxAll,
bool DWARFMustBeAtTheEnd) const { bool DWARFMustBeAtTheEnd) const {
MCStreamer *S; MCStreamer *S;
switch (T.getObjectFormat()) { switch (T.getObjectFormat()) {
@ -511,8 +503,7 @@ namespace llvm {
/// ///
/// \param TT The target triple. /// \param TT The target triple.
/// \param Ctx The target context. /// \param Ctx The target context.
MCRelocationInfo * MCRelocationInfo *createMCRelocationInfo(StringRef TT, MCContext &Ctx) const {
createMCRelocationInfo(StringRef TT, MCContext &Ctx) const {
MCRelocationInfoCtorTy Fn = MCRelocationInfoCtorFn MCRelocationInfoCtorTy Fn = MCRelocationInfoCtorFn
? MCRelocationInfoCtorFn ? MCRelocationInfoCtorFn
: llvm::createMCRelocationInfo; : llvm::createMCRelocationInfo;
@ -522,12 +513,15 @@ namespace llvm {
/// createMCSymbolizer - Create a target specific MCSymbolizer. /// createMCSymbolizer - Create a target specific MCSymbolizer.
/// ///
/// \param TT The target triple. /// \param TT The target triple.
/// \param GetOpInfo The function to get the symbolic information for operands. /// \param GetOpInfo The function to get the symbolic information for
/// operands.
/// \param SymbolLookUp The function to lookup a symbol name. /// \param SymbolLookUp The function to lookup a symbol name.
/// \param DisInfo The pointer to the block of symbolic information for above call /// \param DisInfo The pointer to the block of symbolic information for above
/// call
/// back. /// back.
/// \param Ctx The target context. /// \param Ctx The target context.
/// \param RelInfo The relocation information for this target. Takes ownership. /// \param RelInfo The relocation information for this target. Takes
/// ownership.
MCSymbolizer * MCSymbolizer *
createMCSymbolizer(StringRef TT, LLVMOpInfoCallback GetOpInfo, createMCSymbolizer(StringRef TT, LLVMOpInfoCallback GetOpInfo,
LLVMSymbolLookupCallback SymbolLookUp, void *DisInfo, LLVMSymbolLookupCallback SymbolLookUp, void *DisInfo,
@ -554,15 +548,12 @@ namespace llvm {
const Target *Current; const Target *Current;
explicit iterator(Target *T) : Current(T) {} explicit iterator(Target *T) : Current(T) {}
friend struct TargetRegistry; friend struct TargetRegistry;
public: public:
iterator() : Current(nullptr) {} iterator() : Current(nullptr) {}
bool operator==(const iterator &x) const { bool operator==(const iterator &x) const { return Current == x.Current; }
return Current == x.Current; bool operator!=(const iterator &x) const { return !operator==(x); }
}
bool operator!=(const iterator &x) const {
return !operator==(x);
}
// Iterator traversal: forward iteration only // Iterator traversal: forward iteration only
iterator &operator++() { // Preincrement iterator &operator++() { // Preincrement
@ -581,9 +572,7 @@ namespace llvm {
return *Current; return *Current;
} }
const Target *operator->() const { const Target *operator->() const { return &operator*(); }
return &operator*();
}
}; };
/// printRegisteredTargetsForVersion - Print the registered targets /// printRegisteredTargetsForVersion - Print the registered targets
@ -615,8 +604,7 @@ namespace llvm {
/// \param Error - On failure, an error string describing why no target was /// \param Error - On failure, an error string describing why no target was
/// found. /// found.
static const Target *lookupTarget(const std::string &ArchName, static const Target *lookupTarget(const std::string &ArchName,
Triple &TheTriple, Triple &TheTriple, std::string &Error);
std::string &Error);
/// @} /// @}
/// @name Target Registration /// @name Target Registration
@ -636,9 +624,7 @@ namespace llvm {
/// @param ArchMatchFn - The arch match checking function for this target. /// @param ArchMatchFn - The arch match checking function for this target.
/// @param HasJIT - Whether the target supports JIT code /// @param HasJIT - Whether the target supports JIT code
/// generation. /// generation.
static void RegisterTarget(Target &T, static void RegisterTarget(Target &T, const char *Name, const char *ShortDesc,
const char *Name,
const char *ShortDesc,
Target::ArchMatchFnTy ArchMatchFn, Target::ArchMatchFnTy ArchMatchFn,
bool HasJIT = false); bool HasJIT = false);
@ -725,8 +711,7 @@ namespace llvm {
/// ///
/// @param T - The target being registered. /// @param T - The target being registered.
/// @param Fn - A function to construct a TargetMachine for the target. /// @param Fn - A function to construct a TargetMachine for the target.
static void RegisterTargetMachine(Target &T, static void RegisterTargetMachine(Target &T, Target::TargetMachineCtorTy Fn) {
Target::TargetMachineCtorTy Fn) {
T.TargetMachineCtorFn = Fn; T.TargetMachineCtorFn = Fn;
} }
@ -792,8 +777,7 @@ namespace llvm {
/// ///
/// @param T - The target being registered. /// @param T - The target being registered.
/// @param Fn - A function to construct an MCInstPrinter for the target. /// @param Fn - A function to construct an MCInstPrinter for the target.
static void RegisterMCInstPrinter(Target &T, static void RegisterMCInstPrinter(Target &T, Target::MCInstPrinterCtorTy Fn) {
Target::MCInstPrinterCtorTy Fn) {
T.MCInstPrinterCtorFn = Fn; T.MCInstPrinterCtorFn = Fn;
} }
@ -806,8 +790,7 @@ namespace llvm {
/// ///
/// @param T - The target being registered. /// @param T - The target being registered.
/// @param Fn - A function to construct an MCCodeEmitter for the target. /// @param Fn - A function to construct an MCCodeEmitter for the target.
static void RegisterMCCodeEmitter(Target &T, static void RegisterMCCodeEmitter(Target &T, Target::MCCodeEmitterCtorTy Fn) {
Target::MCCodeEmitterCtorTy Fn) {
T.MCCodeEmitterCtorFn = Fn; T.MCCodeEmitterCtorFn = Fn;
} }
@ -815,8 +798,7 @@ namespace llvm {
T.COFFStreamerCtorFn = Fn; T.COFFStreamerCtorFn = Fn;
} }
static void RegisterMachOStreamer(Target &T, static void RegisterMachOStreamer(Target &T, Target::MachOStreamerCtorTy Fn) {
Target::MachOStreamerCtorTy Fn) {
T.MachOStreamerCtorFn = Fn; T.MachOStreamerCtorFn = Fn;
} }
@ -824,8 +806,8 @@ namespace llvm {
T.ELFStreamerCtorFn = Fn; T.ELFStreamerCtorFn = Fn;
} }
static void static void RegisterNullTargetStreamer(Target &T,
RegisterNullTargetStreamer(Target &T, Target::NullTargetStreamerCtorTy Fn) { Target::NullTargetStreamerCtorTy Fn) {
T.NullTargetStreamerCtorFn = Fn; T.NullTargetStreamerCtorFn = Fn;
} }
@ -863,15 +845,13 @@ namespace llvm {
/// ///
/// @param T - The target being registered. /// @param T - The target being registered.
/// @param Fn - A function to construct an MCSymbolizer for the target. /// @param Fn - A function to construct an MCSymbolizer for the target.
static void RegisterMCSymbolizer(Target &T, static void RegisterMCSymbolizer(Target &T, Target::MCSymbolizerCtorTy Fn) {
Target::MCSymbolizerCtorTy Fn) {
T.MCSymbolizerCtorFn = Fn; T.MCSymbolizerCtorFn = Fn;
} }
/// @} /// @}
}; };
//===--------------------------------------------------------------------===// //===--------------------------------------------------------------------===//
/// RegisterTarget - Helper template for registering a target, for use in the /// RegisterTarget - Helper template for registering a target, for use in the
@ -903,16 +883,15 @@ namespace llvm {
/// extern Target TheFooTarget; /// extern Target TheFooTarget;
/// RegisterMCAsmInfo<FooMCAsmInfo> X(TheFooTarget); /// RegisterMCAsmInfo<FooMCAsmInfo> X(TheFooTarget);
/// } /// }
template<class MCAsmInfoImpl> template <class MCAsmInfoImpl> struct RegisterMCAsmInfo {
struct RegisterMCAsmInfo {
RegisterMCAsmInfo(Target &T) { RegisterMCAsmInfo(Target &T) {
TargetRegistry::RegisterMCAsmInfo(T, &Allocator); TargetRegistry::RegisterMCAsmInfo(T, &Allocator);
} }
private: private:
static MCAsmInfo *Allocator(const MCRegisterInfo & /*MRI*/, StringRef TT) { static MCAsmInfo *Allocator(const MCRegisterInfo & /*MRI*/, StringRef TT) {
return new MCAsmInfoImpl(TT); return new MCAsmInfoImpl(TT);
} }
}; };
/// RegisterMCAsmInfoFn - Helper template for registering a target assembly info /// RegisterMCAsmInfoFn - Helper template for registering a target assembly info
@ -929,7 +908,8 @@ namespace llvm {
} }
}; };
/// RegisterMCCodeGenInfo - Helper template for registering a target codegen info /// RegisterMCCodeGenInfo - Helper template for registering a target codegen
/// info
/// implementation. This invokes the static "Create" method on the class /// implementation. This invokes the static "Create" method on the class
/// to actually do the construction. Usage: /// to actually do the construction. Usage:
/// ///
@ -937,11 +917,11 @@ namespace llvm {
/// extern Target TheFooTarget; /// extern Target TheFooTarget;
/// RegisterMCCodeGenInfo<FooMCCodeGenInfo> X(TheFooTarget); /// RegisterMCCodeGenInfo<FooMCCodeGenInfo> X(TheFooTarget);
/// } /// }
template<class MCCodeGenInfoImpl> template <class MCCodeGenInfoImpl> struct RegisterMCCodeGenInfo {
struct RegisterMCCodeGenInfo {
RegisterMCCodeGenInfo(Target &T) { RegisterMCCodeGenInfo(Target &T) {
TargetRegistry::RegisterMCCodeGenInfo(T, &Allocator); TargetRegistry::RegisterMCCodeGenInfo(T, &Allocator);
} }
private: private:
static MCCodeGenInfo *Allocator(StringRef /*TT*/, Reloc::Model /*RM*/, static MCCodeGenInfo *Allocator(StringRef /*TT*/, Reloc::Model /*RM*/,
CodeModel::Model /*CM*/, CodeModel::Model /*CM*/,
@ -972,15 +952,13 @@ namespace llvm {
/// extern Target TheFooTarget; /// extern Target TheFooTarget;
/// RegisterMCInstrInfo<FooMCInstrInfo> X(TheFooTarget); /// RegisterMCInstrInfo<FooMCInstrInfo> X(TheFooTarget);
/// } /// }
template<class MCInstrInfoImpl> template <class MCInstrInfoImpl> struct RegisterMCInstrInfo {
struct RegisterMCInstrInfo {
RegisterMCInstrInfo(Target &T) { RegisterMCInstrInfo(Target &T) {
TargetRegistry::RegisterMCInstrInfo(T, &Allocator); TargetRegistry::RegisterMCInstrInfo(T, &Allocator);
} }
private: private:
static MCInstrInfo *Allocator() { static MCInstrInfo *Allocator() { return new MCInstrInfoImpl(); }
return new MCInstrInfoImpl();
}
}; };
/// RegisterMCInstrInfoFn - Helper template for registering a target /// RegisterMCInstrInfoFn - Helper template for registering a target
@ -1005,11 +983,11 @@ namespace llvm {
/// extern Target TheFooTarget; /// extern Target TheFooTarget;
/// RegisterMCInstrAnalysis<FooMCInstrAnalysis> X(TheFooTarget); /// RegisterMCInstrAnalysis<FooMCInstrAnalysis> X(TheFooTarget);
/// } /// }
template<class MCInstrAnalysisImpl> template <class MCInstrAnalysisImpl> struct RegisterMCInstrAnalysis {
struct RegisterMCInstrAnalysis {
RegisterMCInstrAnalysis(Target &T) { RegisterMCInstrAnalysis(Target &T) {
TargetRegistry::RegisterMCInstrAnalysis(T, &Allocator); TargetRegistry::RegisterMCInstrAnalysis(T, &Allocator);
} }
private: private:
static MCInstrAnalysis *Allocator(const MCInstrInfo *Info) { static MCInstrAnalysis *Allocator(const MCInstrInfo *Info) {
return new MCInstrAnalysisImpl(Info); return new MCInstrAnalysisImpl(Info);
@ -1038,11 +1016,11 @@ namespace llvm {
/// extern Target TheFooTarget; /// extern Target TheFooTarget;
/// RegisterMCRegInfo<FooMCRegInfo> X(TheFooTarget); /// RegisterMCRegInfo<FooMCRegInfo> X(TheFooTarget);
/// } /// }
template<class MCRegisterInfoImpl> template <class MCRegisterInfoImpl> struct RegisterMCRegInfo {
struct RegisterMCRegInfo {
RegisterMCRegInfo(Target &T) { RegisterMCRegInfo(Target &T) {
TargetRegistry::RegisterMCRegInfo(T, &Allocator); TargetRegistry::RegisterMCRegInfo(T, &Allocator);
} }
private: private:
static MCRegisterInfo *Allocator(StringRef /*TT*/) { static MCRegisterInfo *Allocator(StringRef /*TT*/) {
return new MCRegisterInfoImpl(); return new MCRegisterInfoImpl();
@ -1071,11 +1049,11 @@ namespace llvm {
/// extern Target TheFooTarget; /// extern Target TheFooTarget;
/// RegisterMCSubtargetInfo<FooMCSubtargetInfo> X(TheFooTarget); /// RegisterMCSubtargetInfo<FooMCSubtargetInfo> X(TheFooTarget);
/// } /// }
template<class MCSubtargetInfoImpl> template <class MCSubtargetInfoImpl> struct RegisterMCSubtargetInfo {
struct RegisterMCSubtargetInfo {
RegisterMCSubtargetInfo(Target &T) { RegisterMCSubtargetInfo(Target &T) {
TargetRegistry::RegisterMCSubtargetInfo(T, &Allocator); TargetRegistry::RegisterMCSubtargetInfo(T, &Allocator);
} }
private: private:
static MCSubtargetInfo *Allocator(StringRef /*TT*/, StringRef /*CPU*/, static MCSubtargetInfo *Allocator(StringRef /*TT*/, StringRef /*CPU*/,
StringRef /*FS*/) { StringRef /*FS*/) {
@ -1105,18 +1083,15 @@ namespace llvm {
/// extern Target TheFooTarget; /// extern Target TheFooTarget;
/// RegisterTargetMachine<FooTargetMachine> X(TheFooTarget); /// RegisterTargetMachine<FooTargetMachine> X(TheFooTarget);
/// } /// }
template<class TargetMachineImpl> template <class TargetMachineImpl> struct RegisterTargetMachine {
struct RegisterTargetMachine {
RegisterTargetMachine(Target &T) { RegisterTargetMachine(Target &T) {
TargetRegistry::RegisterTargetMachine(T, &Allocator); TargetRegistry::RegisterTargetMachine(T, &Allocator);
} }
private: private:
static TargetMachine *Allocator(const Target &T, StringRef TT, static TargetMachine *Allocator(const Target &T, StringRef TT, StringRef CPU,
StringRef CPU, StringRef FS, StringRef FS, const TargetOptions &Options,
const TargetOptions &Options, Reloc::Model RM, CodeModel::Model CM,
Reloc::Model RM,
CodeModel::Model CM,
CodeGenOpt::Level OL) { CodeGenOpt::Level OL) {
return new TargetMachineImpl(T, TT, CPU, FS, Options, RM, CM, OL); return new TargetMachineImpl(T, TT, CPU, FS, Options, RM, CM, OL);
} }
@ -1129,15 +1104,13 @@ namespace llvm {
/// extern Target TheFooTarget; /// extern Target TheFooTarget;
/// RegisterMCAsmBackend<FooAsmLexer> X(TheFooTarget); /// RegisterMCAsmBackend<FooAsmLexer> X(TheFooTarget);
/// } /// }
template<class MCAsmBackendImpl> template <class MCAsmBackendImpl> struct RegisterMCAsmBackend {
struct RegisterMCAsmBackend {
RegisterMCAsmBackend(Target &T) { RegisterMCAsmBackend(Target &T) {
TargetRegistry::RegisterMCAsmBackend(T, &Allocator); TargetRegistry::RegisterMCAsmBackend(T, &Allocator);
} }
private: private:
static MCAsmBackend *Allocator(const Target &T, static MCAsmBackend *Allocator(const Target &T, const MCRegisterInfo &MRI,
const MCRegisterInfo &MRI,
StringRef Triple, StringRef CPU) { StringRef Triple, StringRef CPU) {
return new MCAsmBackendImpl(T, MRI, Triple, CPU); return new MCAsmBackendImpl(T, MRI, Triple, CPU);
} }
@ -1151,8 +1124,7 @@ namespace llvm {
/// extern Target TheFooTarget; /// extern Target TheFooTarget;
/// RegisterMCAsmParser<FooAsmParser> X(TheFooTarget); /// RegisterMCAsmParser<FooAsmParser> X(TheFooTarget);
/// } /// }
template<class MCAsmParserImpl> template <class MCAsmParserImpl> struct RegisterMCAsmParser {
struct RegisterMCAsmParser {
RegisterMCAsmParser(Target &T) { RegisterMCAsmParser(Target &T) {
TargetRegistry::RegisterMCAsmParser(T, &Allocator); TargetRegistry::RegisterMCAsmParser(T, &Allocator);
} }
@ -1173,8 +1145,7 @@ namespace llvm {
/// extern Target TheFooTarget; /// extern Target TheFooTarget;
/// RegisterAsmPrinter<FooAsmPrinter> X(TheFooTarget); /// RegisterAsmPrinter<FooAsmPrinter> X(TheFooTarget);
/// } /// }
template<class AsmPrinterImpl> template <class AsmPrinterImpl> struct RegisterAsmPrinter {
struct RegisterAsmPrinter {
RegisterAsmPrinter(Target &T) { RegisterAsmPrinter(Target &T) {
TargetRegistry::RegisterAsmPrinter(T, &Allocator); TargetRegistry::RegisterAsmPrinter(T, &Allocator);
} }
@ -1194,8 +1165,7 @@ namespace llvm {
/// extern Target TheFooTarget; /// extern Target TheFooTarget;
/// RegisterMCCodeEmitter<FooCodeEmitter> X(TheFooTarget); /// RegisterMCCodeEmitter<FooCodeEmitter> X(TheFooTarget);
/// } /// }
template<class MCCodeEmitterImpl> template <class MCCodeEmitterImpl> struct RegisterMCCodeEmitter {
struct RegisterMCCodeEmitter {
RegisterMCCodeEmitter(Target &T) { RegisterMCCodeEmitter(Target &T) {
TargetRegistry::RegisterMCCodeEmitter(T, &Allocator); TargetRegistry::RegisterMCCodeEmitter(T, &Allocator);
} }
@ -1207,7 +1177,6 @@ namespace llvm {
return new MCCodeEmitterImpl(); return new MCCodeEmitterImpl();
} }
}; };
} }
#endif #endif