[llvm-commits] [llvm] r75892 - in /llvm/trunk: include/llvm/Target/TargetMachineRegistry.h tools/llvm-ld/llvm-ld.cpp tools/lto/LTOCodeGenerator.cpp tools/lto/LTOModule.cpp
Daniel Dunbar
daniel at zuster.org
Wed Jul 15 19:41:19 PDT 2009
Author: ddunbar
Date: Wed Jul 15 21:41:19 2009
New Revision: 75892
URL: http://llvm.org/viewvc/llvm-project?rev=75892&view=rev
Log:
Kill off last uses of TargetMachineRegistry class.
Modified:
llvm/trunk/include/llvm/Target/TargetMachineRegistry.h
llvm/trunk/tools/llvm-ld/llvm-ld.cpp
llvm/trunk/tools/lto/LTOCodeGenerator.cpp
llvm/trunk/tools/lto/LTOModule.cpp
Modified: llvm/trunk/include/llvm/Target/TargetMachineRegistry.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetMachineRegistry.h?rev=75892&r1=75891&r2=75892&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Target/TargetMachineRegistry.h (original)
+++ llvm/trunk/include/llvm/Target/TargetMachineRegistry.h Wed Jul 15 21:41:19 2009
@@ -18,7 +18,6 @@
#define LLVM_TARGET_TARGETMACHINEREGISTRY_H
#include "llvm/Module.h"
-#include "llvm/Support/Registry.h"
#include "llvm/Target/TargetRegistry.h"
namespace llvm {
@@ -26,29 +25,6 @@
class Target;
class TargetMachine;
- struct TargetMachineRegistryEntry {
- const Target &TheTarget;
- const char *Name;
- const char *ShortDesc;
-
- public:
- TargetMachineRegistryEntry(const Target &T, const char *N, const char *SD)
- : TheTarget(T), Name(N), ShortDesc(SD) {}
- };
-
- template<>
- class RegistryTraits<TargetMachine> {
- public:
- typedef TargetMachineRegistryEntry entry;
-
- static const char *nameof(const entry &Entry) { return Entry.Name; }
- static const char *descof(const entry &Entry) { return Entry.ShortDesc; }
- };
-
- struct TargetMachineRegistry : public Registry<TargetMachine> {
-
- };
-
//===--------------------------------------------------------------------===//
/// RegisterTarget - This class is used to make targets automatically register
/// themselves with the tools they are linked with. Targets should define an
@@ -63,16 +39,11 @@
template<class TargetMachineImpl>
struct RegisterTarget {
- RegisterTarget(Target &T, const char *Name, const char *ShortDesc)
- : Entry(T, Name, ShortDesc),
- Node(Entry) {
+ RegisterTarget(Target &T, const char *Name, const char *ShortDesc) {
TargetRegistry::RegisterTargetMachine(T, &Allocator);
}
private:
- TargetMachineRegistry::entry Entry;
- TargetMachineRegistry::node Node;
-
static TargetMachine *Allocator(const Target &T, const Module &M,
const std::string &FS) {
return new TargetMachineImpl(T, M, FS);
Modified: llvm/trunk/tools/llvm-ld/llvm-ld.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-ld/llvm-ld.cpp?rev=75892&r1=75891&r2=75892&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-ld/llvm-ld.cpp (original)
+++ llvm/trunk/tools/llvm-ld/llvm-ld.cpp Wed Jul 15 21:41:19 2009
@@ -29,7 +29,6 @@
#include "llvm/Bitcode/ReaderWriter.h"
#include "llvm/Target/TargetData.h"
#include "llvm/Target/TargetMachine.h"
-#include "llvm/Target/TargetMachineRegistry.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/FileUtilities.h"
#include "llvm/Support/ManagedStatic.h"
Modified: llvm/trunk/tools/lto/LTOCodeGenerator.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/lto/LTOCodeGenerator.cpp?rev=75892&r1=75891&r2=75892&view=diff
==============================================================================
--- llvm/trunk/tools/lto/LTOCodeGenerator.cpp (original)
+++ llvm/trunk/tools/lto/LTOCodeGenerator.cpp Wed Jul 15 21:41:19 2009
@@ -41,7 +41,7 @@
#include "llvm/Target/TargetAsmInfo.h"
#include "llvm/Target/TargetData.h"
#include "llvm/Target/TargetMachine.h"
-#include "llvm/Target/TargetMachineRegistry.h"
+#include "llvm/Target/TargetRegistry.h"
#include "llvm/Target/TargetSelect.h"
#include "llvm/Transforms/IPO.h"
#include "llvm/Transforms/Scalar.h"
Modified: llvm/trunk/tools/lto/LTOModule.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/lto/LTOModule.cpp?rev=75892&r1=75891&r2=75892&view=diff
==============================================================================
--- llvm/trunk/tools/lto/LTOModule.cpp (original)
+++ llvm/trunk/tools/lto/LTOModule.cpp Wed Jul 15 21:41:19 2009
@@ -27,9 +27,9 @@
#include "llvm/System/Path.h"
#include "llvm/System/Process.h"
#include "llvm/Target/SubtargetFeature.h"
-#include "llvm/Target/TargetMachine.h"
-#include "llvm/Target/TargetMachineRegistry.h"
#include "llvm/Target/TargetAsmInfo.h"
+#include "llvm/Target/TargetMachine.h"
+#include "llvm/Target/TargetRegistry.h"
#include <fstream>
More information about the llvm-commits
mailing list