aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/Mips
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-07-18 23:03:22 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-07-18 23:03:22 +0000
commit4cb1e13769856716261a4d315f8202bd918502c3 (patch)
tree37be097eff658bad62348fef9c360a801f6303f3 /lib/Target/Mips
parent8ad2f9873939b1815bd4f788969ca210df42a8d4 (diff)
downloadexternal_llvm-4cb1e13769856716261a4d315f8202bd918502c3.zip
external_llvm-4cb1e13769856716261a4d315f8202bd918502c3.tar.gz
external_llvm-4cb1e13769856716261a4d315f8202bd918502c3.tar.bz2
Put Target definitions inside Target specific header, and llvm namespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76344 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/Mips')
-rw-r--r--lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp2
-rw-r--r--lib/Target/Mips/Mips.h4
-rw-r--r--lib/Target/Mips/MipsTargetMachine.cpp2
-rw-r--r--lib/Target/Mips/TargetInfo/MipsTargetInfo.cpp5
4 files changed, 7 insertions, 6 deletions
diff --git a/lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp b/lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp
index 43da443..abdd5a3 100644
--- a/lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp
+++ b/lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp
@@ -578,10 +578,8 @@ doFinalization(Module &M)
// Force static initialization.
extern "C" void LLVMInitializeMipsAsmPrinter() {
- extern Target TheMipsTarget;
TargetRegistry::RegisterAsmPrinter(TheMipsTarget, createMipsCodePrinterPass);
- extern Target TheMipselTarget;
TargetRegistry::RegisterAsmPrinter(TheMipselTarget,
createMipsCodePrinterPass);
}
diff --git a/lib/Target/Mips/Mips.h b/lib/Target/Mips/Mips.h
index 1ff34fb..09a8072 100644
--- a/lib/Target/Mips/Mips.h
+++ b/lib/Target/Mips/Mips.h
@@ -28,6 +28,10 @@ namespace llvm {
FunctionPass *createMipsCodePrinterPass(formatted_raw_ostream &OS,
TargetMachine &TM,
bool Verbose);
+
+ extern Target TheMipsTarget;
+ extern Target TheMipselTarget;
+
} // end namespace llvm;
// Defines symbolic names for Mips registers. This defines a mapping from
diff --git a/lib/Target/Mips/MipsTargetMachine.cpp b/lib/Target/Mips/MipsTargetMachine.cpp
index e29a96d..e82dcee 100644
--- a/lib/Target/Mips/MipsTargetMachine.cpp
+++ b/lib/Target/Mips/MipsTargetMachine.cpp
@@ -20,10 +20,8 @@
using namespace llvm;
// Register the target.
-extern Target TheMipsTarget;
static RegisterTarget<MipsTargetMachine> X(TheMipsTarget, "mips", "Mips");
-extern Target TheMipselTarget;
static RegisterTarget<MipselTargetMachine> Y(TheMipselTarget, "mipsel",
"Mipsel");
diff --git a/lib/Target/Mips/TargetInfo/MipsTargetInfo.cpp b/lib/Target/Mips/TargetInfo/MipsTargetInfo.cpp
index 1f4dc9e..1188a74 100644
--- a/lib/Target/Mips/TargetInfo/MipsTargetInfo.cpp
+++ b/lib/Target/Mips/TargetInfo/MipsTargetInfo.cpp
@@ -7,11 +7,12 @@
//
//===----------------------------------------------------------------------===//
+#include "Mips.h"
#include "llvm/Module.h"
#include "llvm/Target/TargetRegistry.h"
using namespace llvm;
-Target TheMipsTarget;
+Target llvm::TheMipsTarget;
static unsigned Mips_JITMatchQuality() {
return 0;
@@ -40,7 +41,7 @@ static unsigned Mips_ModuleMatchQuality(const Module &M) {
return 0;
}
-Target TheMipselTarget;
+Target llvm::TheMipselTarget;
static unsigned Mipsel_JITMatchQuality() {
return 0;