#ifndef LLVM_PASS_SUPPORT_H
#define LLVM_PASS_SUPPORT_H
-// No need to include Pass.h, we are being included by it!
+#include "Pass.h"
namespace llvm {
/// TODO : Rename
intptr_t getTypeInfo() const { return PassID; }
+ /// Return true if this PassID implements the specified ID pointer.
+ bool isPassID(void *IDPtr) const {
+ return PassID == (intptr_t)IDPtr;
+ }
+
/// isAnalysisGroup - Return true if this is an analysis group, not a normal
/// pass.
///
return ItfImpl;
}
- /// getPassInfo - Deprecated API compaatibility function. This function
- /// just returns 'this'.
- ///
- const PassInfo *getPassInfo() const {
- return this;
- }
-
protected:
void registerPass();
void unregisterPass();
/// a nice name with the interface.
///
class RegisterAGBase : public PassInfo {
- PassInfo *InterfaceInfo;
- const PassInfo *ImplementationInfo;
- bool isDefaultImplementation;
protected:
- explicit RegisterAGBase(const char *Name,
- intptr_t InterfaceID,
- intptr_t PassID = 0,
- bool isDefault = false);
+ RegisterAGBase(const char *Name,
+ intptr_t InterfaceID,
+ intptr_t PassID = 0,
+ bool isDefault = false);
};
template<typename Interface, bool Default = false>