diff options
author | Evan Cheng <evan.cheng@apple.com> | 2011-07-14 23:50:31 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2011-07-14 23:50:31 +0000 |
commit | 1abf2cb59b8d63415780a03329307c0997b2670c (patch) | |
tree | 40bd0acf3a26bd3417cfc81af3ef5f22631d7903 /lib/Target/Alpha | |
parent | e696436a7ef32d892e3f76f38e84146dacc232b5 (diff) | |
download | external_llvm-1abf2cb59b8d63415780a03329307c0997b2670c.zip external_llvm-1abf2cb59b8d63415780a03329307c0997b2670c.tar.gz external_llvm-1abf2cb59b8d63415780a03329307c0997b2670c.tar.bz2 |
Rename createAsmInfo to createMCAsmInfo and move registration code to MCTargetDesc to prepare for next round of changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135219 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/Alpha')
-rw-r--r-- | lib/Target/Alpha/AlphaTargetMachine.cpp | 2 | ||||
-rw-r--r-- | lib/Target/Alpha/MCTargetDesc/AlphaMCAsmInfo.cpp (renamed from lib/Target/Alpha/AlphaMCAsmInfo.cpp) | 0 | ||||
-rw-r--r-- | lib/Target/Alpha/MCTargetDesc/AlphaMCAsmInfo.h (renamed from lib/Target/Alpha/AlphaMCAsmInfo.h) | 0 | ||||
-rw-r--r-- | lib/Target/Alpha/MCTargetDesc/AlphaMCTargetDesc.cpp | 12 | ||||
-rw-r--r-- | lib/Target/Alpha/MCTargetDesc/CMakeLists.txt | 5 |
5 files changed, 12 insertions, 7 deletions
diff --git a/lib/Target/Alpha/AlphaTargetMachine.cpp b/lib/Target/Alpha/AlphaTargetMachine.cpp index b872fc6..3b65d41 100644 --- a/lib/Target/Alpha/AlphaTargetMachine.cpp +++ b/lib/Target/Alpha/AlphaTargetMachine.cpp @@ -11,7 +11,6 @@ //===----------------------------------------------------------------------===// #include "Alpha.h" -#include "AlphaMCAsmInfo.h" #include "AlphaTargetMachine.h" #include "llvm/PassManager.h" #include "llvm/Support/FormattedStream.h" @@ -21,7 +20,6 @@ using namespace llvm; extern "C" void LLVMInitializeAlphaTarget() { // Register the target. RegisterTargetMachine<AlphaTargetMachine> X(TheAlphaTarget); - RegisterAsmInfo<AlphaMCAsmInfo> Y(TheAlphaTarget); } AlphaTargetMachine::AlphaTargetMachine(const Target &T, const std::string &TT, diff --git a/lib/Target/Alpha/AlphaMCAsmInfo.cpp b/lib/Target/Alpha/MCTargetDesc/AlphaMCAsmInfo.cpp index a35e884..a35e884 100644 --- a/lib/Target/Alpha/AlphaMCAsmInfo.cpp +++ b/lib/Target/Alpha/MCTargetDesc/AlphaMCAsmInfo.cpp diff --git a/lib/Target/Alpha/AlphaMCAsmInfo.h b/lib/Target/Alpha/MCTargetDesc/AlphaMCAsmInfo.h index 837844b..837844b 100644 --- a/lib/Target/Alpha/AlphaMCAsmInfo.h +++ b/lib/Target/Alpha/MCTargetDesc/AlphaMCAsmInfo.h diff --git a/lib/Target/Alpha/MCTargetDesc/AlphaMCTargetDesc.cpp b/lib/Target/Alpha/MCTargetDesc/AlphaMCTargetDesc.cpp index 7e256b2..562052b 100644 --- a/lib/Target/Alpha/MCTargetDesc/AlphaMCTargetDesc.cpp +++ b/lib/Target/Alpha/MCTargetDesc/AlphaMCTargetDesc.cpp @@ -12,6 +12,7 @@ //===----------------------------------------------------------------------===// #include "AlphaMCTargetDesc.h" +#include "AlphaMCAsmInfo.h" #include "llvm/MC/MCInstrInfo.h" #include "llvm/MC/MCRegisterInfo.h" #include "llvm/MC/MCSubtargetInfo.h" @@ -29,7 +30,7 @@ using namespace llvm; -MCInstrInfo *createAlphaMCInstrInfo() { +static MCInstrInfo *createAlphaMCInstrInfo() { MCInstrInfo *X = new MCInstrInfo(); InitAlphaMCInstrInfo(X); return X; @@ -39,9 +40,8 @@ extern "C" void LLVMInitializeAlphaMCInstrInfo() { TargetRegistry::RegisterMCInstrInfo(TheAlphaTarget, createAlphaMCInstrInfo); } - -MCSubtargetInfo *createAlphaMCSubtargetInfo(StringRef TT, StringRef CPU, - StringRef FS) { +static MCSubtargetInfo *createAlphaMCSubtargetInfo(StringRef TT, StringRef CPU, + StringRef FS) { MCSubtargetInfo *X = new MCSubtargetInfo(); InitAlphaMCSubtargetInfo(X, TT, CPU, FS); return X; @@ -51,3 +51,7 @@ extern "C" void LLVMInitializeAlphaMCSubtargetInfo() { TargetRegistry::RegisterMCSubtargetInfo(TheAlphaTarget, createAlphaMCSubtargetInfo); } + +extern "C" void LLVMInitializeAlphaMCAsmInfo() { + RegisterMCAsmInfo<AlphaMCAsmInfo> X(TheAlphaTarget); +} diff --git a/lib/Target/Alpha/MCTargetDesc/CMakeLists.txt b/lib/Target/Alpha/MCTargetDesc/CMakeLists.txt index b538604..ad0dd26 100644 --- a/lib/Target/Alpha/MCTargetDesc/CMakeLists.txt +++ b/lib/Target/Alpha/MCTargetDesc/CMakeLists.txt @@ -1 +1,4 @@ -add_llvm_library(LLVMAlphaDesc AlphaMCTargetDesc.cpp) +add_llvm_library(LLVMAlphaDesc + AlphaMCTargetDesc.cpp + AlphaMCAsmInfo.cpp + ) |