diff options
author | Owen Anderson <resistor@mac.com> | 2010-08-06 00:23:35 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2010-08-06 00:23:35 +0000 |
commit | 1f74590e9d1b9cf0f1f81a156efea73f76546e05 (patch) | |
tree | f3b2fa6368e824b1dd3ad04e8c1c4f070b4bb4a0 /include/llvm/Analysis | |
parent | f6d6df40060eef9af19b084b2fb7a8fd627415ae (diff) | |
download | external_llvm-1f74590e9d1b9cf0f1f81a156efea73f76546e05.tar.gz external_llvm-1f74590e9d1b9cf0f1f81a156efea73f76546e05.tar.bz2 external_llvm-1f74590e9d1b9cf0f1f81a156efea73f76546e05.zip |
Revert r110396 to fix buildbots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110410 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Analysis')
-rw-r--r-- | include/llvm/Analysis/DOTGraphTraitsPass.h | 4 | ||||
-rw-r--r-- | include/llvm/Analysis/Dominators.h | 6 | ||||
-rw-r--r-- | include/llvm/Analysis/FindUsedTypes.h | 2 | ||||
-rw-r--r-- | include/llvm/Analysis/IntervalPartition.h | 2 | ||||
-rw-r--r-- | include/llvm/Analysis/LazyValueInfo.h | 2 | ||||
-rw-r--r-- | include/llvm/Analysis/LibCallAliasAnalysis.h | 8 | ||||
-rw-r--r-- | include/llvm/Analysis/LoopDependenceAnalysis.h | 2 | ||||
-rw-r--r-- | include/llvm/Analysis/LoopInfo.h | 2 | ||||
-rw-r--r-- | include/llvm/Analysis/LoopPass.h | 3 | ||||
-rw-r--r-- | include/llvm/Analysis/Passes.h | 4 | ||||
-rw-r--r-- | include/llvm/Analysis/PostDominators.h | 4 |
11 files changed, 20 insertions, 19 deletions
diff --git a/include/llvm/Analysis/DOTGraphTraitsPass.h b/include/llvm/Analysis/DOTGraphTraitsPass.h index d8daf5196f..4828eba5b5 100644 --- a/include/llvm/Analysis/DOTGraphTraitsPass.h +++ b/include/llvm/Analysis/DOTGraphTraitsPass.h @@ -22,7 +22,7 @@ template <class Analysis, bool Simple> struct DOTGraphTraitsViewer : public FunctionPass { std::string Name; - DOTGraphTraitsViewer(std::string GraphName, char &ID) : FunctionPass(ID) { + DOTGraphTraitsViewer(std::string GraphName, const void *ID) : FunctionPass(ID) { Name = GraphName; } @@ -48,7 +48,7 @@ struct DOTGraphTraitsPrinter : public FunctionPass { std::string Name; - DOTGraphTraitsPrinter(std::string GraphName, char &ID) + DOTGraphTraitsPrinter(std::string GraphName, const void *ID) : FunctionPass(ID) { Name = GraphName; } diff --git a/include/llvm/Analysis/Dominators.h b/include/llvm/Analysis/Dominators.h index 73c6e6286b..f79afdd1e9 100644 --- a/include/llvm/Analysis/Dominators.h +++ b/include/llvm/Analysis/Dominators.h @@ -702,7 +702,7 @@ public: static char ID; // Pass ID, replacement for typeid DominatorTreeBase<BasicBlock>* DT; - DominatorTree() : FunctionPass(ID) { + DominatorTree() : FunctionPass(&ID) { DT = new DominatorTreeBase<BasicBlock>(false); } @@ -890,7 +890,7 @@ protected: const bool IsPostDominators; public: - DominanceFrontierBase(char &ID, bool isPostDom) + DominanceFrontierBase(void *ID, bool isPostDom) : FunctionPass(ID), IsPostDominators(isPostDom) {} /// getRoots - Return the root blocks of the current CFG. This may include @@ -1009,7 +1009,7 @@ class DominanceFrontier : public DominanceFrontierBase { public: static char ID; // Pass ID, replacement for typeid DominanceFrontier() : - DominanceFrontierBase(ID, false) {} + DominanceFrontierBase(&ID, false) {} BasicBlock *getRoot() const { assert(Roots.size() == 1 && "Should always have entry node!"); diff --git a/include/llvm/Analysis/FindUsedTypes.h b/include/llvm/Analysis/FindUsedTypes.h index 8a78eb6249..1337385848 100644 --- a/include/llvm/Analysis/FindUsedTypes.h +++ b/include/llvm/Analysis/FindUsedTypes.h @@ -26,7 +26,7 @@ class FindUsedTypes : public ModulePass { std::set<const Type *> UsedTypes; public: static char ID; // Pass identification, replacement for typeid - FindUsedTypes() : ModulePass(ID) {} + FindUsedTypes() : ModulePass(&ID) {} /// getTypes - After the pass has been run, return the set containing all of /// the types used in the module. diff --git a/include/llvm/Analysis/IntervalPartition.h b/include/llvm/Analysis/IntervalPartition.h index 75a5cdf1f9..c1214e7427 100644 --- a/include/llvm/Analysis/IntervalPartition.h +++ b/include/llvm/Analysis/IntervalPartition.h @@ -48,7 +48,7 @@ class IntervalPartition : public FunctionPass { public: static char ID; // Pass identification, replacement for typeid - IntervalPartition() : FunctionPass(ID), RootInterval(0) {} + IntervalPartition() : FunctionPass(&ID), RootInterval(0) {} // run - Calculate the interval partition for this function virtual bool runOnFunction(Function &F); diff --git a/include/llvm/Analysis/LazyValueInfo.h b/include/llvm/Analysis/LazyValueInfo.h index ac164c19c9..f59b2e3532 100644 --- a/include/llvm/Analysis/LazyValueInfo.h +++ b/include/llvm/Analysis/LazyValueInfo.h @@ -31,7 +31,7 @@ class LazyValueInfo : public FunctionPass { void operator=(const LazyValueInfo&); // DO NOT IMPLEMENT. public: static char ID; - LazyValueInfo() : FunctionPass(ID), PImpl(0) {} + LazyValueInfo() : FunctionPass(&ID), PImpl(0) {} ~LazyValueInfo() { assert(PImpl == 0 && "releaseMemory not called"); } /// Tristate - This is used to return true/false/dunno results. diff --git a/include/llvm/Analysis/LibCallAliasAnalysis.h b/include/llvm/Analysis/LibCallAliasAnalysis.h index c9adf3f36a..37abb77dc2 100644 --- a/include/llvm/Analysis/LibCallAliasAnalysis.h +++ b/include/llvm/Analysis/LibCallAliasAnalysis.h @@ -28,9 +28,9 @@ namespace llvm { LibCallInfo *LCI; explicit LibCallAliasAnalysis(LibCallInfo *LC = 0) - : FunctionPass(ID), LCI(LC) { + : FunctionPass(&ID), LCI(LC) { } - explicit LibCallAliasAnalysis(char &ID, LibCallInfo *LC) + explicit LibCallAliasAnalysis(const void *ID, LibCallInfo *LC) : FunctionPass(ID), LCI(LC) { } ~LibCallAliasAnalysis(); @@ -55,8 +55,8 @@ namespace llvm { /// 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 void *PI) { - if (PI == &AliasAnalysis::ID) + virtual void *getAdjustedAnalysisPointer(const PassInfo *PI) { + if (PI->isPassID(&AliasAnalysis::ID)) return (AliasAnalysis*)this; return this; } diff --git a/include/llvm/Analysis/LoopDependenceAnalysis.h b/include/llvm/Analysis/LoopDependenceAnalysis.h index 94fd990709..a1a563796f 100644 --- a/include/llvm/Analysis/LoopDependenceAnalysis.h +++ b/include/llvm/Analysis/LoopDependenceAnalysis.h @@ -91,7 +91,7 @@ class LoopDependenceAnalysis : public LoopPass { public: static char ID; // Class identification, replacement for typeinfo - LoopDependenceAnalysis() : LoopPass(ID) {} + LoopDependenceAnalysis() : LoopPass(&ID) {} /// isDependencePair - Check whether two values can possibly give rise to /// a data dependence: that is the case if both are instructions accessing diff --git a/include/llvm/Analysis/LoopInfo.h b/include/llvm/Analysis/LoopInfo.h index 462620f7e3..2e90a9631f 100644 --- a/include/llvm/Analysis/LoopInfo.h +++ b/include/llvm/Analysis/LoopInfo.h @@ -940,7 +940,7 @@ class LoopInfo : public FunctionPass { public: static char ID; // Pass identification, replacement for typeid - LoopInfo() : FunctionPass(ID) {} + LoopInfo() : FunctionPass(&ID) {} LoopInfoBase<BasicBlock, Loop>& getBase() { return LI; } diff --git a/include/llvm/Analysis/LoopPass.h b/include/llvm/Analysis/LoopPass.h index 3e1c2a9418..6f77d019b6 100644 --- a/include/llvm/Analysis/LoopPass.h +++ b/include/llvm/Analysis/LoopPass.h @@ -28,7 +28,8 @@ class PMStack; class LoopPass : public Pass { public: - explicit LoopPass(char &pid) : Pass(PT_Loop, pid) {} + explicit LoopPass(intptr_t pid) : Pass(PT_Loop, pid) {} + explicit LoopPass(void *pid) : Pass(PT_Loop, pid) {} /// getPrinterPass - Get a pass to print the function corresponding /// to a Loop. diff --git a/include/llvm/Analysis/Passes.h b/include/llvm/Analysis/Passes.h index 37425ebe83..e8e77960ad 100644 --- a/include/llvm/Analysis/Passes.h +++ b/include/llvm/Analysis/Passes.h @@ -92,7 +92,7 @@ namespace llvm { // file. // ModulePass *createProfileLoaderPass(); - extern char &ProfileLoaderPassID; + extern const PassInfo *ProfileLoaderPassID; //===--------------------------------------------------------------------===// // @@ -106,7 +106,7 @@ namespace llvm { // instead of loading it from a previous run. // FunctionPass *createProfileEstimatorPass(); - extern char &ProfileEstimatorPassID; + extern const PassInfo *ProfileEstimatorPassID; //===--------------------------------------------------------------------===// // diff --git a/include/llvm/Analysis/PostDominators.h b/include/llvm/Analysis/PostDominators.h index 46ce8200f9..5552017d91 100644 --- a/include/llvm/Analysis/PostDominators.h +++ b/include/llvm/Analysis/PostDominators.h @@ -25,7 +25,7 @@ struct PostDominatorTree : public FunctionPass { static char ID; // Pass identification, replacement for typeid DominatorTreeBase<BasicBlock>* DT; - PostDominatorTree() : FunctionPass(ID) { + PostDominatorTree() : FunctionPass(&ID) { DT = new DominatorTreeBase<BasicBlock>(true); } @@ -106,7 +106,7 @@ template <> struct GraphTraits<PostDominatorTree*> struct PostDominanceFrontier : public DominanceFrontierBase { static char ID; PostDominanceFrontier() - : DominanceFrontierBase(ID, true) {} + : DominanceFrontierBase(&ID, true) {} virtual bool runOnFunction(Function &) { Frontiers.clear(); |