summaryrefslogtreecommitdiff
path: root/include/llvm/Pass.h
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2010-07-20 01:19:58 +0000
committerOwen Anderson <resistor@mac.com>2010-07-20 01:19:58 +0000
commit8ba15cb7099d9eadcb345328228d77ffa5afa42d (patch)
tree48778ce4b577178912f4a72d48b761056aae92ae /include/llvm/Pass.h
parentfb272ad614e923bebdf226ff9d3fbce5e2ae1192 (diff)
downloadllvm-8ba15cb7099d9eadcb345328228d77ffa5afa42d.tar.gz
llvm-8ba15cb7099d9eadcb345328228d77ffa5afa42d.tar.bz2
llvm-8ba15cb7099d9eadcb345328228d77ffa5afa42d.tar.xz
Separate PassInfo into two classes: a constructor-free superclass (StaticPassInfo) and a constructor-ful subclass (PassInfo).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108794 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Pass.h')
-rw-r--r--include/llvm/Pass.h17
1 files changed, 9 insertions, 8 deletions
diff --git a/include/llvm/Pass.h b/include/llvm/Pass.h
index 5a5893140e..be73a106bb 100644
--- a/include/llvm/Pass.h
+++ b/include/llvm/Pass.h
@@ -41,6 +41,7 @@ class BasicBlock;
class Function;
class Module;
class AnalysisUsage;
+class StaticPassInfo;
class PassInfo;
class ImmutablePass;
class PMStack;
@@ -50,7 +51,7 @@ class raw_ostream;
class StringRef;
// AnalysisID - Use the PassInfo to identify a pass...
-typedef const PassInfo* AnalysisID;
+typedef const StaticPassInfo* AnalysisID;
/// Different types of internal pass managers. External pass managers
/// (PassManager and FunctionPassManager) are not represented here.
@@ -104,7 +105,7 @@ public:
/// getPassInfo - Return the PassInfo data structure that corresponds to this
/// pass... If the pass has not been registered, this will return null.
///
- const PassInfo *getPassInfo() const;
+ const StaticPassInfo *getPassInfo() const;
/// print - Print out the internal state of the pass. This is called by
/// Analyze to print out the contents of an analysis. Otherwise it is not
@@ -159,7 +160,7 @@ public:
/// an analysis interface through multiple inheritance. If needed, it should
/// override this to adjust the this pointer as needed for the specified pass
/// info.
- virtual void *getAdjustedAnalysisPointer(const PassInfo *);
+ virtual void *getAdjustedAnalysisPointer(const StaticPassInfo *);
virtual ImmutablePass *getAsImmutablePass();
virtual PMDataManager *getAsPMDataManager();
@@ -171,17 +172,17 @@ public:
virtual void dumpPassStructure(unsigned Offset = 0);
template<typename AnalysisClass>
- static const PassInfo *getClassPassInfo() {
+ static const StaticPassInfo *getClassPassInfo() {
return lookupPassInfo(intptr_t(&AnalysisClass::ID));
}
// lookupPassInfo - Return the pass info object for the specified pass class,
// or null if it is not known.
- static const PassInfo *lookupPassInfo(intptr_t TI);
+ static const StaticPassInfo *lookupPassInfo(intptr_t TI);
// lookupPassInfo - Return the pass info object for the pass with the given
// argument string, or null if it is not known.
- static const PassInfo *lookupPassInfo(StringRef Arg);
+ static const StaticPassInfo *lookupPassInfo(StringRef Arg);
/// getAnalysisIfAvailable<AnalysisType>() - Subclasses use this function to
/// get analysis information that might be around, for example to update it.
@@ -213,10 +214,10 @@ public:
AnalysisType &getAnalysis(Function &F); // Defined in PassAnalysisSupport.h
template<typename AnalysisType>
- AnalysisType &getAnalysisID(const PassInfo *PI) const;
+ AnalysisType &getAnalysisID(const StaticPassInfo *PI) const;
template<typename AnalysisType>
- AnalysisType &getAnalysisID(const PassInfo *PI, Function &F);
+ AnalysisType &getAnalysisID(const StaticPassInfo *PI, Function &F);
};