Start moving pass registration over to using the ManagedStatic mechanism.

This fixes issues where passes get unregistered before llvm_shutdown is
called, and is generally cleaner and simpler.  Analysis groups up next.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32108 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2006-12-01 23:27:45 +00:00
parent 0555122412
commit baf2ecda5f
3 changed files with 52 additions and 48 deletions

View File

@@ -74,14 +74,6 @@ public:
}
virtual void passEnumerate(const PassInfo *P) { passRegistered(P); }
virtual void passUnregistered(const PassInfo *P) {
if (ignorablePass(P) || !Opt) return;
assert(findOption(P->getPassArgument()) != getNumOptions() &&
"Registered Pass not in the pass map!");
removeLiteralOption(P->getPassArgument());
Opt->removeArgument(P->getPassArgument());
}
// ValLessThan - Provide a sorting comparator for Values elements...
typedef std::pair<const char*,
std::pair<const PassInfo*, const char*> > ValType;