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/Sparc | |
parent | 668274645476eb6a4be1ceef81d756c7095bb5ac (diff) | |
download | external_llvm-e78085a3c03de648a481e9751c3094c517bd7123.zip external_llvm-e78085a3c03de648a481e9751c3094c517bd7123.tar.gz external_llvm-e78085a3c03de648a481e9751c3094c517bd7123.tar.bz2 |
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/Sparc')
-rw-r--r-- | lib/Target/Sparc/MCTargetDesc/SparcMCTargetDesc.cpp | 36 |
1 files changed, 16 insertions, 20 deletions
diff --git a/lib/Target/Sparc/MCTargetDesc/SparcMCTargetDesc.cpp b/lib/Target/Sparc/MCTargetDesc/SparcMCTargetDesc.cpp index 28046bf..59d909e 100644 --- a/lib/Target/Sparc/MCTargetDesc/SparcMCTargetDesc.cpp +++ b/lib/Target/Sparc/MCTargetDesc/SparcMCTargetDesc.cpp @@ -35,20 +35,12 @@ static MCInstrInfo *createSparcMCInstrInfo() { return X; } -extern "C" void LLVMInitializeSparcMCInstrInfo() { - TargetRegistry::RegisterMCInstrInfo(TheSparcTarget, createSparcMCInstrInfo); -} - static MCRegisterInfo *createSparcMCRegisterInfo(StringRef TT) { MCRegisterInfo *X = new MCRegisterInfo(); InitSparcMCRegisterInfo(X, SP::I7); return X; } -extern "C" void LLVMInitializeSparcMCRegisterInfo() { - TargetRegistry::RegisterMCRegInfo(TheSparcTarget, createSparcMCRegisterInfo); -} - static MCSubtargetInfo *createSparcMCSubtargetInfo(StringRef TT, StringRef CPU, StringRef FS) { MCSubtargetInfo *X = new MCSubtargetInfo(); @@ -56,16 +48,6 @@ static MCSubtargetInfo *createSparcMCSubtargetInfo(StringRef TT, StringRef CPU, return X; } -extern "C" void LLVMInitializeSparcMCSubtargetInfo() { - TargetRegistry::RegisterMCSubtargetInfo(TheSparcTarget, - createSparcMCSubtargetInfo); -} - -extern "C" void LLVMInitializeSparcMCAsmInfo() { - RegisterMCAsmInfo<SparcELFMCAsmInfo> X(TheSparcTarget); - RegisterMCAsmInfo<SparcELFMCAsmInfo> Y(TheSparcV9Target); -} - MCCodeGenInfo *createSparcMCCodeGenInfo(StringRef TT, Reloc::Model RM, CodeModel::Model CM) { MCCodeGenInfo *X = new MCCodeGenInfo(); @@ -73,10 +55,24 @@ MCCodeGenInfo *createSparcMCCodeGenInfo(StringRef TT, Reloc::Model RM, return X; } -extern "C" void LLVMInitializeSparcMCCodeGenInfo() { +extern "C" void LLVMInitializeSparcTargetMC() { + // Register the MC asm info. + RegisterMCAsmInfo<SparcELFMCAsmInfo> X(TheSparcTarget); + RegisterMCAsmInfo<SparcELFMCAsmInfo> Y(TheSparcV9Target); + + // Register the MC codegen info. TargetRegistry::RegisterMCCodeGenInfo(TheSparcTarget, createSparcMCCodeGenInfo); TargetRegistry::RegisterMCCodeGenInfo(TheSparcV9Target, createSparcMCCodeGenInfo); -} + // Register the MC instruction info. + TargetRegistry::RegisterMCInstrInfo(TheSparcTarget, createSparcMCInstrInfo); + + // Register the MC register info. + TargetRegistry::RegisterMCRegInfo(TheSparcTarget, createSparcMCRegisterInfo); + + // Register the MC subtarget info. + TargetRegistry::RegisterMCSubtargetInfo(TheSparcTarget, + createSparcMCSubtargetInfo); +} |