summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/Alpha
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2011-07-14 23:50:31 +0000
committerEvan Cheng <evan.cheng@apple.com>2011-07-14 23:50:31 +0000
commit1705ab00ab5c9cd43924e24ef440dabda4e5ab60 (patch)
tree56e314311c0564eab98c8375d52ad6ee0b4fb881 /llvm/lib/Target/Alpha
parent82432f7edf2d089bc947e3b3d2e3d4419d3c4a1f (diff)
downloadbcm5719-llvm-1705ab00ab5c9cd43924e24ef440dabda4e5ab60.tar.gz
bcm5719-llvm-1705ab00ab5c9cd43924e24ef440dabda4e5ab60.zip
Rename createAsmInfo to createMCAsmInfo and move registration code to MCTargetDesc to prepare for next round of changes.
llvm-svn: 135219
Diffstat (limited to 'llvm/lib/Target/Alpha')
-rw-r--r--llvm/lib/Target/Alpha/AlphaTargetMachine.cpp2
-rw-r--r--llvm/lib/Target/Alpha/MCTargetDesc/AlphaMCAsmInfo.cpp (renamed from llvm/lib/Target/Alpha/AlphaMCAsmInfo.cpp)0
-rw-r--r--llvm/lib/Target/Alpha/MCTargetDesc/AlphaMCAsmInfo.h (renamed from llvm/lib/Target/Alpha/AlphaMCAsmInfo.h)0
-rw-r--r--llvm/lib/Target/Alpha/MCTargetDesc/AlphaMCTargetDesc.cpp12
-rw-r--r--llvm/lib/Target/Alpha/MCTargetDesc/CMakeLists.txt5
5 files changed, 12 insertions, 7 deletions
diff --git a/llvm/lib/Target/Alpha/AlphaTargetMachine.cpp b/llvm/lib/Target/Alpha/AlphaTargetMachine.cpp
index b872fc63f23..3b65d41be89 100644
--- a/llvm/lib/Target/Alpha/AlphaTargetMachine.cpp
+++ b/llvm/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/llvm/lib/Target/Alpha/AlphaMCAsmInfo.cpp b/llvm/lib/Target/Alpha/MCTargetDesc/AlphaMCAsmInfo.cpp
index a35e8846e07..a35e8846e07 100644
--- a/llvm/lib/Target/Alpha/AlphaMCAsmInfo.cpp
+++ b/llvm/lib/Target/Alpha/MCTargetDesc/AlphaMCAsmInfo.cpp
diff --git a/llvm/lib/Target/Alpha/AlphaMCAsmInfo.h b/llvm/lib/Target/Alpha/MCTargetDesc/AlphaMCAsmInfo.h
index 837844bd29a..837844bd29a 100644
--- a/llvm/lib/Target/Alpha/AlphaMCAsmInfo.h
+++ b/llvm/lib/Target/Alpha/MCTargetDesc/AlphaMCAsmInfo.h
diff --git a/llvm/lib/Target/Alpha/MCTargetDesc/AlphaMCTargetDesc.cpp b/llvm/lib/Target/Alpha/MCTargetDesc/AlphaMCTargetDesc.cpp
index 7e256b272bf..562052b6df6 100644
--- a/llvm/lib/Target/Alpha/MCTargetDesc/AlphaMCTargetDesc.cpp
+++ b/llvm/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/llvm/lib/Target/Alpha/MCTargetDesc/CMakeLists.txt b/llvm/lib/Target/Alpha/MCTargetDesc/CMakeLists.txt
index b5386041348..ad0dd26aafb 100644
--- a/llvm/lib/Target/Alpha/MCTargetDesc/CMakeLists.txt
+++ b/llvm/lib/Target/Alpha/MCTargetDesc/CMakeLists.txt
@@ -1 +1,4 @@
-add_llvm_library(LLVMAlphaDesc AlphaMCTargetDesc.cpp)
+add_llvm_library(LLVMAlphaDesc
+ AlphaMCTargetDesc.cpp
+ AlphaMCAsmInfo.cpp
+ )
OpenPOWER on IntegriCloud