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
diff --git a/lib/Target/MSIL/MSILWriter.cpp b/lib/Target/MSIL/MSILWriter.cpp
index dbfcdb7..af5e722 100644
--- a/lib/Target/MSIL/MSILWriter.cpp
+++ b/lib/Target/MSIL/MSILWriter.cpp
@@ -47,7 +47,6 @@
};
}
-extern Target TheMSILTarget;
static RegisterTarget<MSILTarget> X(TheMSILTarget, "msil", "MSIL backend");
// Force static initialization.
diff --git a/lib/Target/MSIL/MSILWriter.h b/lib/Target/MSIL/MSILWriter.h
index f1b6a69..0d0d0ff 100644
--- a/lib/Target/MSIL/MSILWriter.h
+++ b/lib/Target/MSIL/MSILWriter.h
@@ -30,6 +30,10 @@
#include <ios>
using namespace llvm;
+namespace llvm {
+ extern Target TheMSILTarget;
+}
+
namespace {
class MSILModule : public ModulePass {
@@ -253,6 +257,7 @@
void printExternals();
};
+
}
#endif
diff --git a/lib/Target/MSIL/TargetInfo/MSILTargetInfo.cpp b/lib/Target/MSIL/TargetInfo/MSILTargetInfo.cpp
index 47e650b..79e9c20 100644
--- a/lib/Target/MSIL/TargetInfo/MSILTargetInfo.cpp
+++ b/lib/Target/MSIL/TargetInfo/MSILTargetInfo.cpp
@@ -11,7 +11,7 @@
#include "llvm/Target/TargetRegistry.h"
using namespace llvm;
-Target TheMSILTarget;
+Target llvm::TheMSILTarget;
static unsigned MSIL_JITMatchQuality() {
return 0;