diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-07-15 11:48:36 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-07-15 11:48:36 +0000 |
commit | 6501145ec6b4e555d23a835631a848ea35b59226 (patch) | |
tree | 4b1ac1374a450d2d69629940ca136d5dee6f5a86 /include | |
parent | 54785e6df01aa239759a5717d7cc115387e34559 (diff) | |
download | external_llvm-6501145ec6b4e555d23a835631a848ea35b59226.zip external_llvm-6501145ec6b4e555d23a835631a848ea35b59226.tar.gz external_llvm-6501145ec6b4e555d23a835631a848ea35b59226.tar.bz2 |
Kill off unused TargetMachineRegistry methods and ivars.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75774 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/Target/TargetMachineRegistry.h | 32 | ||||
-rw-r--r-- | include/llvm/Target/TargetRegistry.h | 2 |
2 files changed, 7 insertions, 27 deletions
diff --git a/include/llvm/Target/TargetMachineRegistry.h b/include/llvm/Target/TargetMachineRegistry.h index 80ff188..a5cc0a6 100644 --- a/include/llvm/Target/TargetMachineRegistry.h +++ b/include/llvm/Target/TargetMachineRegistry.h @@ -30,17 +30,10 @@ namespace llvm { const Target &TheTarget; const char *Name; const char *ShortDesc; - TargetMachine *(*CtorFn)(const Module &, const std::string &); - unsigned (*ModuleMatchQualityFn)(const Module &M); - unsigned (*JITMatchQualityFn)(); public: - TargetMachineRegistryEntry(const Target &T, const char *N, const char *SD, - TargetMachine *(*CF)(const Module &, const std::string &), - unsigned (*MMF)(const Module &M), - unsigned (*JMF)()) - : TheTarget(T), Name(N), ShortDesc(SD), CtorFn(CF), - ModuleMatchQualityFn(MMF), JITMatchQualityFn(JMF) {} + TargetMachineRegistryEntry(const Target &T, const char *N, const char *SD) + : TheTarget(T), Name(N), ShortDesc(SD) {} }; template<> @@ -53,24 +46,15 @@ namespace llvm { }; struct TargetMachineRegistry : public Registry<TargetMachine> { - /// getClosestStaticTargetForModule - Given an LLVM module, pick the best - /// target that is compatible with the module. If no close target can be - /// found, this returns null and sets the Error string to a reason. - static const entry *getClosestStaticTargetForModule(const Module &M, - std::string &Error); - - /// getClosestTargetForJIT - Pick the best target that is compatible with - /// the current host. If no close target can be found, this returns null - /// and sets the Error string to a reason. - static const entry *getClosestTargetForJIT(std::string &Error); }; //===--------------------------------------------------------------------===// /// RegisterTarget - This class is used to make targets automatically register - /// themselves with the tool they are linked. Targets should define an - /// instance of this and implement the static methods described in the - /// TargetMachine comments. + /// themselves with the tools they are linked with. Targets should define an + /// single global Target instance and register it using the TargetRegistry + /// interfaces. Targets must also include a static instance of this class. + /// /// The type 'TargetMachineImpl' should provide a constructor with two /// parameters: /// - const Module& M: the module that is being compiled: @@ -80,9 +64,7 @@ namespace llvm { template<class TargetMachineImpl> struct RegisterTarget { RegisterTarget(Target &T, const char *Name, const char *ShortDesc) - : Entry(T, Name, ShortDesc, &Allocator, - &TargetMachineImpl::getModuleMatchQuality, - &TargetMachineImpl::getJITMatchQuality), + : Entry(T, Name, ShortDesc), Node(Entry) { TargetRegistry::RegisterTargetMachine(T, &Allocator); } diff --git a/include/llvm/Target/TargetRegistry.h b/include/llvm/Target/TargetRegistry.h index b3f9e8b..d445294 100644 --- a/include/llvm/Target/TargetRegistry.h +++ b/include/llvm/Target/TargetRegistry.h @@ -49,8 +49,6 @@ namespace llvm { bool); friend struct TargetRegistry; - // FIXME: Temporary hack, please remove. - friend struct TargetMachineRegistry; /// Next - The next registered target in the linked list, maintained by the /// TargetRegistry. |