aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-12-01 22:00:50 +0000
committerChris Lattner <sabre@nondot.org>2006-12-01 22:00:50 +0000
commit5365489f6ce9d8c8d6c7227b1768bd372a37c158 (patch)
treea460f41d793b9addfde949b861b2fd70fa4974b9
parentcd950a5308916f75e0faa6747151338750791fd7 (diff)
remove 'target constructor' support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32100 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/llvm/PassSupport.h20
-rw-r--r--include/llvm/Support/PassNameParser.h3
2 files changed, 6 insertions, 17 deletions
diff --git a/include/llvm/PassSupport.h b/include/llvm/PassSupport.h
index f3cfc3fb3a..60c24b0666 100644
--- a/include/llvm/PassSupport.h
+++ b/include/llvm/PassSupport.h
@@ -42,15 +42,14 @@ class PassInfo {
std::vector<const PassInfo*> ItfImpl;// Interfaces implemented by this pass
Pass *(*NormalCtor)(); // No argument ctor
- Pass *(*TargetCtor)(TargetMachine&); // Ctor taking TargetMachine object...
public:
/// PassInfo ctor - Do not call this directly, this should only be invoked
/// through RegisterPass.
PassInfo(const char *name, const char *arg, const std::type_info &ti,
- Pass *(*normal)() = 0, Pass *(*targetctor)(TargetMachine &) = 0)
+ Pass *(*normal)() = 0)
: PassName(name), PassArgument(arg), TypeInfo(ti), IsAnalysisGroup(false),
- NormalCtor(normal), TargetCtor(targetctor) {
+ NormalCtor(normal) {
}
/// getPassName - Return the friendly name for the pass, never returns null
@@ -94,14 +93,6 @@ public:
return NormalCtor();
}
- /// getTargetCtor - Return a pointer to a function that creates an instance of
- /// the pass and returns it. This returns a constructor for a version of the
- /// pass that takes a TargetMachine object as a parameter.
- ///
- Pass *(*getTargetCtor() const)(TargetMachine &) {
- return TargetCtor;
- }
-
/// addInterfaceImplemented - This method is called when this pass is
/// registered as a member of an analysis group with the RegisterAnalysisGroup
/// template.
@@ -143,13 +134,12 @@ struct RegisterPassBase {
const PassInfo *getPassInfo() const { return &PIObj; }
RegisterPassBase(const char *Name, const char *Arg, const std::type_info &TI,
- Pass *(*Normal)() = 0,
- Pass *(*TargetCtor)(TargetMachine &) = 0)
- : PIObj(Name, Arg, TI, Normal, TargetCtor) {
+ Pass *(*NormalCtor)() = 0)
+ : PIObj(Name, Arg, TI, NormalCtor) {
registerPass();
}
RegisterPassBase(const std::type_info &TI)
- : PIObj("", "", TI, 0, 0) {
+ : PIObj("", "", TI) {
// This ctor may only be used for analysis groups: it does not auto-register
// the pass.
PIObj.SetIsAnalysisGroup();
diff --git a/include/llvm/Support/PassNameParser.h b/include/llvm/Support/PassNameParser.h
index c3d4901700..6259257e04 100644
--- a/include/llvm/Support/PassNameParser.h
+++ b/include/llvm/Support/PassNameParser.h
@@ -57,8 +57,7 @@ public:
// Ignore non-selectable and non-constructible passes! Ignore
// non-optimizations.
return P->getPassArgument() == 0 || *P->getPassArgument() == 0 ||
- (P->getNormalCtor() == 0 && P->getTargetCtor() == 0) ||
- ignorablePassImpl(P);
+ P->getNormalCtor() == 0 || ignorablePassImpl(P);
}
// Implement the PassRegistrationListener callbacks used to populate our map