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/SystemZ | |
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/SystemZ')
-rw-r--r-- | lib/Target/SystemZ/MCTargetDesc/SystemZMCTargetDesc.cpp | 37 |
1 files changed, 17 insertions, 20 deletions
diff --git a/lib/Target/SystemZ/MCTargetDesc/SystemZMCTargetDesc.cpp b/lib/Target/SystemZ/MCTargetDesc/SystemZMCTargetDesc.cpp index 57c3917..fc73216 100644 --- a/lib/Target/SystemZ/MCTargetDesc/SystemZMCTargetDesc.cpp +++ b/lib/Target/SystemZ/MCTargetDesc/SystemZMCTargetDesc.cpp @@ -35,22 +35,12 @@ static MCInstrInfo *createSystemZMCInstrInfo() { return X; } -extern "C" void LLVMInitializeSystemZMCInstrInfo() { - TargetRegistry::RegisterMCInstrInfo(TheSystemZTarget, - createSystemZMCInstrInfo); -} - static MCRegisterInfo *createSystemZMCRegisterInfo(StringRef TT) { MCRegisterInfo *X = new MCRegisterInfo(); InitSystemZMCRegisterInfo(X, 0); return X; } -extern "C" void LLVMInitializeSystemZMCRegisterInfo() { - TargetRegistry::RegisterMCRegInfo(TheSystemZTarget, - createSystemZMCRegisterInfo); -} - static MCSubtargetInfo *createSystemZMCSubtargetInfo(StringRef TT, StringRef CPU, StringRef FS) { @@ -59,15 +49,6 @@ static MCSubtargetInfo *createSystemZMCSubtargetInfo(StringRef TT, return X; } -extern "C" void LLVMInitializeSystemZMCSubtargetInfo() { - TargetRegistry::RegisterMCSubtargetInfo(TheSystemZTarget, - createSystemZMCSubtargetInfo); -} - -extern "C" void LLVMInitializeSystemZMCAsmInfo() { - RegisterMCAsmInfo<SystemZMCAsmInfo> X(TheSystemZTarget); -} - MCCodeGenInfo *createSystemZMCCodeGenInfo(StringRef TT, Reloc::Model RM, CodeModel::Model CM) { MCCodeGenInfo *X = new MCCodeGenInfo(); @@ -77,7 +58,23 @@ MCCodeGenInfo *createSystemZMCCodeGenInfo(StringRef TT, Reloc::Model RM, return X; } -extern "C" void LLVMInitializeSystemZMCCodeGenInfo() { +extern "C" void LLVMInitializeSystemZTargetMC() { + // Register the MC asm info. + RegisterMCAsmInfo<SystemZMCAsmInfo> X(TheSystemZTarget); + + // Register the MC codegen info. TargetRegistry::RegisterMCCodeGenInfo(TheSystemZTarget, createSystemZMCCodeGenInfo); + + // Register the MC instruction info. + TargetRegistry::RegisterMCInstrInfo(TheSystemZTarget, + createSystemZMCInstrInfo); + + // Register the MC register info. + TargetRegistry::RegisterMCRegInfo(TheSystemZTarget, + createSystemZMCRegisterInfo); + + // Register the MC subtarget info. + TargetRegistry::RegisterMCSubtargetInfo(TheSystemZTarget, + createSystemZMCSubtargetInfo); } |