diff options
author | Evan Cheng <evan.cheng@apple.com> | 2011-07-22 21:58:54 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2011-07-22 21:58:54 +0000 |
commit | e78085a3c03de648a481e9751c3094c517bd7123 (patch) | |
tree | 9e10b62529d26843c940ed08bcb7e53ef2073cde /lib/Target/MSP430 | |
parent | 668274645476eb6a4be1ceef81d756c7095bb5ac (diff) |
Combine all MC initialization routines into one. e.g. InitializeX86MCAsmInfo,
InitializeX86MCInstrInfo, etc. are combined into InitializeX86TargetMC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135812 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/MSP430')
-rw-r--r-- | lib/Target/MSP430/MCTargetDesc/MSP430MCTargetDesc.cpp | 36 |
1 files changed, 16 insertions, 20 deletions
diff --git a/lib/Target/MSP430/MCTargetDesc/MSP430MCTargetDesc.cpp b/lib/Target/MSP430/MCTargetDesc/MSP430MCTargetDesc.cpp index 60b80c3607..393a6324c1 100644 --- a/lib/Target/MSP430/MCTargetDesc/MSP430MCTargetDesc.cpp +++ b/lib/Target/MSP430/MCTargetDesc/MSP430MCTargetDesc.cpp @@ -35,22 +35,12 @@ static MCInstrInfo *createMSP430MCInstrInfo() { return X; } -extern "C" void LLVMInitializeMSP430MCInstrInfo() { - TargetRegistry::RegisterMCInstrInfo(TheMSP430Target, createMSP430MCInstrInfo); -} - - static MCRegisterInfo *createMSP430MCRegisterInfo(StringRef TT) { MCRegisterInfo *X = new MCRegisterInfo(); InitMSP430MCRegisterInfo(X, MSP430::PCW); return X; } -extern "C" void LLVMInitializeMSP430MCRegisterInfo() { - TargetRegistry::RegisterMCRegInfo(TheMSP430Target, - createMSP430MCRegisterInfo); -} - static MCSubtargetInfo *createMSP430MCSubtargetInfo(StringRef TT, StringRef CPU, StringRef FS) { MCSubtargetInfo *X = new MCSubtargetInfo(); @@ -58,15 +48,6 @@ static MCSubtargetInfo *createMSP430MCSubtargetInfo(StringRef TT, StringRef CPU, return X; } -extern "C" void LLVMInitializeMSP430MCSubtargetInfo() { - TargetRegistry::RegisterMCSubtargetInfo(TheMSP430Target, - createMSP430MCSubtargetInfo); -} - -extern "C" void LLVMInitializeMSP430MCAsmInfo() { - RegisterMCAsmInfo<MSP430MCAsmInfo> X(TheMSP430Target); -} - MCCodeGenInfo *createMSP430MCCodeGenInfo(StringRef TT, Reloc::Model RM, CodeModel::Model CM) { MCCodeGenInfo *X = new MCCodeGenInfo(); @@ -74,7 +55,22 @@ MCCodeGenInfo *createMSP430MCCodeGenInfo(StringRef TT, Reloc::Model RM, return X; } -extern "C" void LLVMInitializeMSP430MCCodeGenInfo() { +extern "C" void LLVMInitializeMSP430TargetMC() { + // Register the MC asm info. + RegisterMCAsmInfo<MSP430MCAsmInfo> X(TheMSP430Target); + + // Register the MC codegen info. TargetRegistry::RegisterMCCodeGenInfo(TheMSP430Target, createMSP430MCCodeGenInfo); + + // Register the MC instruction info. + TargetRegistry::RegisterMCInstrInfo(TheMSP430Target, createMSP430MCInstrInfo); + + // Register the MC register info. + TargetRegistry::RegisterMCRegInfo(TheMSP430Target, + createMSP430MCRegisterInfo); + + // Register the MC subtarget info. + TargetRegistry::RegisterMCSubtargetInfo(TheMSP430Target, + createMSP430MCSubtargetInfo); } |