[PATCH] Don't register and de-register all PassRegistrationListeners automatically
David Blaikie
dblaikie at gmail.com
Wed Jun 11 17:00:05 PDT 2014
I'm with Reid - ship it. (comments describing some optional simplifications, if you like)
================
Comment at: include/llvm/IR/LegacyPassNameParser.h:47
@@ -47,2 +46,3 @@
+ PassNameParser();
virtual ~PassNameParser();
----------------
should we just remove this dtor entirely? (I don't see any reason it needs to be virtual, and it doesn't do anything)
================
Comment at: include/llvm/PassSupport.h:344
@@ -345,8 +343,3 @@
- /// PassRegistrationListener ctor - Add the current object to the list of
- /// PassRegistrationListeners...
- PassRegistrationListener();
-
- /// dtor - Remove object from list of listeners...
- ///
- virtual ~PassRegistrationListener();
+ PassRegistrationListener() {}
+ virtual ~PassRegistrationListener() {}
----------------
You can omit this ctor entirely.
================
Comment at: include/llvm/PassSupport.h:345
@@ -353,1 +344,3 @@
+ PassRegistrationListener() {}
+ virtual ~PassRegistrationListener() {}
----------------
You could make this dtor non-virtual and protected, if you like (not necessary by any means) since these things aren't polymorphically owned/destroyed, by the looks of it.
http://reviews.llvm.org/D4106
More information about the llvm-commits
mailing list