aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-08-04 04:02:45 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-08-04 04:02:45 +0000
commit214e22396fe86aa20c587d5c7df9ce63bfd4549e (patch)
tree207b168d9836859d7aecda292bd32f8d9cd31a53 /include
parent2822e174f6e7d728c03c47cf0fcda8a01253107a (diff)
downloadexternal_llvm-214e22396fe86aa20c587d5c7df9ce63bfd4549e.zip
external_llvm-214e22396fe86aa20c587d5c7df9ce63bfd4549e.tar.gz
external_llvm-214e22396fe86aa20c587d5c7df9ce63bfd4549e.tar.bz2
Remove now unused Module argument to createTargetMachine.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78043 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Target/TargetRegistry.h33
1 files changed, 8 insertions, 25 deletions
diff --git a/include/llvm/Target/TargetRegistry.h b/include/llvm/Target/TargetRegistry.h
index 496df84..4a1c55d 100644
--- a/include/llvm/Target/TargetRegistry.h
+++ b/include/llvm/Target/TargetRegistry.h
@@ -23,9 +23,6 @@
// FIXME: We shouldn't need this header, but we need it until there is a
// different interface to get the TargetAsmInfo.
#include "llvm/Target/TargetMachine.h"
-// FIXME: We shouldn't need this header, but we need it until there is a
-// different interface to the target machines.
-#include "llvm/Module.h"
#include <string>
#include <cassert>
@@ -50,7 +47,6 @@ namespace llvm {
typedef unsigned (*TripleMatchQualityFnTy)(const std::string &TT);
typedef TargetMachine *(*TargetMachineCtorTy)(const Target &,
- const Module &,
const std::string &,
const std::string &);
typedef FunctionPass *(*AsmPrinterCtorTy)(formatted_raw_ostream &,
@@ -120,12 +116,16 @@ namespace llvm {
/// feature set; it should always be provided. Generally this should be
/// either the target triple from the module, or the target triple of the
/// host if that does not exist.
- TargetMachine *createTargetMachine(const Module &M,
- const std::string &Triple,
+ TargetMachine *createTargetMachine(const std::string &Triple,
const std::string &Features) const {
if (!TargetMachineCtorFn)
return 0;
- return TargetMachineCtorFn(*this, M, Triple, Features);
+ return TargetMachineCtorFn(*this, Triple, Features);
+ }
+ TargetMachine *createTargetMachine(const Module &M,
+ const std::string &Triple,
+ const std::string &Features) const {
+ return createTargetMachine(Triple, Features);
}
/// createAsmPrinter - Create a target specific assembly printer pass.
@@ -149,8 +149,6 @@ namespace llvm {
};
/// TargetRegistry - Generic interface to target specific features.
- //
- // FIXME: Provide Target* iterator.
struct TargetRegistry {
class iterator {
const Target *Current;
@@ -327,27 +325,12 @@ namespace llvm {
}
private:
- static TargetMachine *Allocator(const Target &T, const Module &M,
- const std::string &TT,
+ static TargetMachine *Allocator(const Target &T, const std::string &TT,
const std::string &FS) {
return new TargetMachineImpl(T, TT, FS);
}
};
- template<class TargetMachineImpl>
- struct RegisterTargetMachineDeprecated {
- RegisterTargetMachineDeprecated(Target &T) {
- TargetRegistry::RegisterTargetMachine(T, &Allocator);
- }
-
- private:
- static TargetMachine *Allocator(const Target &T, const Module &M,
- const std::string &TT,
- const std::string &FS) {
- return new TargetMachineImpl(T, M, FS);
- }
- };
-
/// RegisterAsmPrinter - Helper template for registering a target specific
/// assembly printer, for use in the target machine initialization
/// function. Usage: