aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/PassSupport.h
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-12-18 20:10:56 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-12-18 20:10:56 +0000
commit044eb2f6afba375a914ac9d8024f8f5142bb912e (patch)
tree1475247dc9f9fe5be155ebd4c9069c75aadf8c20 /include/llvm/PassSupport.h
parenteb70dddbd77e120e5d490bd8fbe7ff3f8fa81c6b (diff)
Notes
Diffstat (limited to 'include/llvm/PassSupport.h')
-rw-r--r--include/llvm/PassSupport.h20
1 files changed, 7 insertions, 13 deletions
diff --git a/include/llvm/PassSupport.h b/include/llvm/PassSupport.h
index 602f45ac51787..1bf23dcba50b9 100644
--- a/include/llvm/PassSupport.h
+++ b/include/llvm/PassSupport.h
@@ -21,16 +21,16 @@
#ifndef LLVM_PASSSUPPORT_H
#define LLVM_PASSSUPPORT_H
-#include "Pass.h"
-#include "llvm/InitializePasses.h"
+#include "llvm/ADT/StringRef.h"
#include "llvm/PassInfo.h"
#include "llvm/PassRegistry.h"
-#include "llvm/Support/Atomic.h"
#include "llvm/Support/Threading.h"
#include <functional>
namespace llvm {
+class Pass;
+
#define INITIALIZE_PASS(passName, arg, name, cfg, analysis) \
static void *initialize##passName##PassOnce(PassRegistry &Registry) { \
PassInfo *PI = new PassInfo( \
@@ -88,7 +88,6 @@ template <typename PassName> Pass *callDefaultCtor() { return new PassName(); }
///
/// This statement will cause your pass to be created by calling the default
/// constructor exposed by the pass.
-///
template <typename passName> struct RegisterPass : public PassInfo {
// Register Pass using default constructor...
RegisterPass(StringRef PassArg, StringRef Name, bool CFGOnly = false,
@@ -118,7 +117,6 @@ template <typename passName> struct RegisterPass : public PassInfo {
/// The actual interface may also be registered as well (by not specifying the
/// second template argument). The interface should be registered to associate
/// a nice name with the interface.
-///
class RegisterAGBase : public PassInfo {
public:
RegisterAGBase(StringRef Name, const void *InterfaceID,
@@ -196,27 +194,23 @@ struct RegisterAnalysisGroup : public RegisterAGBase {
/// at runtime (which can be because of the RegisterPass constructors being run
/// as the program starts up, or may be because a shared object just got
/// loaded).
-///
struct PassRegistrationListener {
- PassRegistrationListener() {}
- virtual ~PassRegistrationListener() {}
+ PassRegistrationListener() = default;
+ virtual ~PassRegistrationListener() = default;
/// Callback functions - These functions are invoked whenever a pass is loaded
/// or removed from the current executable.
- ///
virtual void passRegistered(const PassInfo *) {}
/// enumeratePasses - Iterate over the registered passes, calling the
/// passEnumerate callback on each PassInfo object.
- ///
void enumeratePasses();
/// passEnumerate - Callback function invoked when someone calls
/// enumeratePasses on this PassRegistrationListener object.
- ///
virtual void passEnumerate(const PassInfo *) {}
};
-} // End llvm namespace
+} // end namespace llvm
-#endif
+#endif // LLVM_PASSSUPPORT_H