diff options
author | Dan Gohman <gohman@apple.com> | 2008-09-04 17:05:41 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2008-09-04 17:05:41 +0000 |
commit | ae73dc1448d25b02cabc7c64c86c64371453dda8 (patch) | |
tree | af8e2a48c6bdac1ac118d027226915ef67e8bdac /include/llvm | |
parent | 79924eb6f5708a2ae36ba22b674b2d7bea3167e6 (diff) | |
download | external_llvm-ae73dc1448d25b02cabc7c64c86c64371453dda8.zip external_llvm-ae73dc1448d25b02cabc7c64c86c64371453dda8.tar.gz external_llvm-ae73dc1448d25b02cabc7c64c86c64371453dda8.tar.bz2 |
Tidy up several unbeseeming casts from pointer to intptr_t.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55779 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm')
-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/LoopPass.h | 1 | ||||
-rw-r--r-- | include/llvm/Analysis/MemoryDependenceAnalysis.h | 2 | ||||
-rw-r--r-- | include/llvm/Analysis/PostDominators.h | 4 | ||||
-rw-r--r-- | include/llvm/Analysis/ScalarEvolution.h | 2 | ||||
-rw-r--r-- | include/llvm/CallGraphSCCPass.h | 1 | ||||
-rw-r--r-- | include/llvm/CodeGen/LiveIntervalAnalysis.h | 2 | ||||
-rw-r--r-- | include/llvm/CodeGen/LiveStackAnalysis.h | 2 | ||||
-rw-r--r-- | include/llvm/CodeGen/LiveVariables.h | 2 | ||||
-rw-r--r-- | include/llvm/CodeGen/MachineFunctionPass.h | 1 | ||||
-rw-r--r-- | include/llvm/Transforms/IPO/InlinerPass.h | 4 | ||||
-rw-r--r-- | include/llvm/Transforms/RSProfiling.h | 2 | ||||
-rw-r--r-- | include/llvm/Transforms/Utils/UnifyFunctionExitNodes.h | 2 |
15 files changed, 19 insertions, 16 deletions
diff --git a/include/llvm/Analysis/Dominators.h b/include/llvm/Analysis/Dominators.h index 6e944d3..94ab04e 100644 --- a/include/llvm/Analysis/Dominators.h +++ b/include/llvm/Analysis/Dominators.h @@ -720,7 +720,7 @@ public: static char ID; // Pass ID, replacement for typeid DominatorTreeBase<BasicBlock>* DT; - DominatorTree() : FunctionPass(intptr_t(&ID)) { + DominatorTree() : FunctionPass(&ID) { DT = new DominatorTreeBase<BasicBlock>(false); } @@ -911,7 +911,7 @@ protected: const bool IsPostDominators; public: - DominanceFrontierBase(intptr_t ID, bool isPostDom) + DominanceFrontierBase(void *ID, bool isPostDom) : FunctionPass(ID), IsPostDominators(isPostDom) {} /// getRoots - Return the root blocks of the current CFG. This may include @@ -1030,7 +1030,7 @@ class DominanceFrontier : public DominanceFrontierBase { public: static char ID; // Pass ID, replacement for typeid DominanceFrontier() : - DominanceFrontierBase(intptr_t(&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 d3e62e2..35e4e6f 100644 --- a/include/llvm/Analysis/FindUsedTypes.h +++ b/include/llvm/Analysis/FindUsedTypes.h @@ -25,7 +25,7 @@ class FindUsedTypes : public ModulePass { std::set<const Type *> UsedTypes; public: static char ID; // Pass identification, replacement for typeid - FindUsedTypes() : ModulePass((intptr_t)&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 e724681..feae6d8 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((intptr_t)&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/LoopPass.h b/include/llvm/Analysis/LoopPass.h index 60ad0d9..af6a617 100644 --- a/include/llvm/Analysis/LoopPass.h +++ b/include/llvm/Analysis/LoopPass.h @@ -30,6 +30,7 @@ class LoopPass : public Pass { public: explicit LoopPass(intptr_t pid) : Pass(pid) {} + explicit LoopPass(void *pid) : Pass(pid) {} // runOnLoop - This method should be implemented by the subclass to perform // whatever action is necessary for the specified Loop. diff --git a/include/llvm/Analysis/MemoryDependenceAnalysis.h b/include/llvm/Analysis/MemoryDependenceAnalysis.h index c6ef41f..c606b22 100644 --- a/include/llvm/Analysis/MemoryDependenceAnalysis.h +++ b/include/llvm/Analysis/MemoryDependenceAnalysis.h @@ -66,7 +66,7 @@ class MemoryDependenceAnalysis : public FunctionPass { static Instruction* const Dirty; static char ID; // Class identification, replacement for typeinfo - MemoryDependenceAnalysis() : FunctionPass((intptr_t)&ID) {} + MemoryDependenceAnalysis() : FunctionPass(&ID) {} /// Pass Implementation stuff. This doesn't do any analysis. /// diff --git a/include/llvm/Analysis/PostDominators.h b/include/llvm/Analysis/PostDominators.h index b99fafc..cd6af74 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((intptr_t)&ID) { + PostDominatorTree() : FunctionPass(&ID) { DT = new DominatorTreeBase<BasicBlock>(true); } @@ -70,7 +70,7 @@ FunctionPass* createPostDomTree(); struct PostDominanceFrontier : public DominanceFrontierBase { static char ID; PostDominanceFrontier() - : DominanceFrontierBase((intptr_t) &ID, true) {} + : DominanceFrontierBase(&ID, true) {} virtual bool runOnFunction(Function &) { Frontiers.clear(); diff --git a/include/llvm/Analysis/ScalarEvolution.h b/include/llvm/Analysis/ScalarEvolution.h index e5b10c9..e16e990 100644 --- a/include/llvm/Analysis/ScalarEvolution.h +++ b/include/llvm/Analysis/ScalarEvolution.h @@ -191,7 +191,7 @@ namespace llvm { void *Impl; // ScalarEvolution uses the pimpl pattern public: static char ID; // Pass identification, replacement for typeid - ScalarEvolution() : FunctionPass((intptr_t)&ID), Impl(0) {} + ScalarEvolution() : FunctionPass(&ID), Impl(0) {} /// getSCEV - Return a SCEV expression handle for the full generality of the /// specified expression. diff --git a/include/llvm/CallGraphSCCPass.h b/include/llvm/CallGraphSCCPass.h index 2600505..d5ff17c 100644 --- a/include/llvm/CallGraphSCCPass.h +++ b/include/llvm/CallGraphSCCPass.h @@ -32,6 +32,7 @@ class PMStack; struct CallGraphSCCPass : public Pass { explicit CallGraphSCCPass(intptr_t pid) : Pass(pid) {} + explicit CallGraphSCCPass(void *pid) : Pass(pid) {} /// doInitialization - This method is called before the SCC's of the program /// has been processed, allowing the pass to do initialization as necessary. diff --git a/include/llvm/CodeGen/LiveIntervalAnalysis.h b/include/llvm/CodeGen/LiveIntervalAnalysis.h index a43c2d4..c77513c 100644 --- a/include/llvm/CodeGen/LiveIntervalAnalysis.h +++ b/include/llvm/CodeGen/LiveIntervalAnalysis.h @@ -94,7 +94,7 @@ namespace llvm { public: static char ID; // Pass identification, replacement for typeid - LiveIntervals() : MachineFunctionPass((intptr_t)&ID) {} + LiveIntervals() : MachineFunctionPass(&ID) {} struct InstrSlots { enum { diff --git a/include/llvm/CodeGen/LiveStackAnalysis.h b/include/llvm/CodeGen/LiveStackAnalysis.h index 87ed67f..5c88bb8 100644 --- a/include/llvm/CodeGen/LiveStackAnalysis.h +++ b/include/llvm/CodeGen/LiveStackAnalysis.h @@ -35,7 +35,7 @@ namespace llvm { public: static char ID; // Pass identification, replacement for typeid - LiveStacks() : MachineFunctionPass((intptr_t)&ID) {} + LiveStacks() : MachineFunctionPass(&ID) {} typedef SS2IntervalMap::iterator iterator; typedef SS2IntervalMap::const_iterator const_iterator; diff --git a/include/llvm/CodeGen/LiveVariables.h b/include/llvm/CodeGen/LiveVariables.h index e2bed5c..18fa6f1 100644 --- a/include/llvm/CodeGen/LiveVariables.h +++ b/include/llvm/CodeGen/LiveVariables.h @@ -43,7 +43,7 @@ class TargetRegisterInfo; class LiveVariables : public MachineFunctionPass { public: static char ID; // Pass identification, replacement for typeid - LiveVariables() : MachineFunctionPass((intptr_t)&ID) {} + LiveVariables() : MachineFunctionPass(&ID) {} /// VarInfo - This represents the regions where a virtual register is live in /// the program. We represent this with three different pieces of diff --git a/include/llvm/CodeGen/MachineFunctionPass.h b/include/llvm/CodeGen/MachineFunctionPass.h index a72563f..95bb2bf 100644 --- a/include/llvm/CodeGen/MachineFunctionPass.h +++ b/include/llvm/CodeGen/MachineFunctionPass.h @@ -27,6 +27,7 @@ namespace llvm { struct MachineFunctionPass : public FunctionPass { explicit MachineFunctionPass(intptr_t ID) : FunctionPass(ID) {} + explicit MachineFunctionPass(void *ID) : FunctionPass(ID) {} protected: /// runOnMachineFunction - This method must be overloaded to perform the diff --git a/include/llvm/Transforms/IPO/InlinerPass.h b/include/llvm/Transforms/IPO/InlinerPass.h index d34641d..e0a3d29 100644 --- a/include/llvm/Transforms/IPO/InlinerPass.h +++ b/include/llvm/Transforms/IPO/InlinerPass.h @@ -26,8 +26,8 @@ namespace llvm { /// perform the inlining operations that does not depend on the policy. /// struct Inliner : public CallGraphSCCPass { - explicit Inliner(const void *ID); - explicit Inliner(const void *ID, int Threshold); + explicit Inliner(void *ID); + explicit Inliner(void *ID, int Threshold); /// getAnalysisUsage - For this class, we declare that we require and preserve /// the call graph. If the derived class implements this method, it should diff --git a/include/llvm/Transforms/RSProfiling.h b/include/llvm/Transforms/RSProfiling.h index b44a992..98ec396 100644 --- a/include/llvm/Transforms/RSProfiling.h +++ b/include/llvm/Transforms/RSProfiling.h @@ -27,7 +27,7 @@ namespace llvm { /// multiple profilers can be support simultaniously. struct RSProfilers : public ModulePass { static char ID; // Pass identification, replacement for typeinfo - RSProfilers() : ModulePass((intptr_t)&ID) {} + RSProfilers() : ModulePass(&ID) {} /// isProfiling - This method returns true if the value passed it was /// inserted by the profiler. diff --git a/include/llvm/Transforms/Utils/UnifyFunctionExitNodes.h b/include/llvm/Transforms/Utils/UnifyFunctionExitNodes.h index 598adfc..c2d0993 100644 --- a/include/llvm/Transforms/Utils/UnifyFunctionExitNodes.h +++ b/include/llvm/Transforms/Utils/UnifyFunctionExitNodes.h @@ -26,7 +26,7 @@ struct UnifyFunctionExitNodes : public FunctionPass { BasicBlock *ReturnBlock, *UnwindBlock, *UnreachableBlock; public: static char ID; // Pass identification, replacement for typeid - UnifyFunctionExitNodes() : FunctionPass((intptr_t)&ID), + UnifyFunctionExitNodes() : FunctionPass(&ID), ReturnBlock(0), UnwindBlock(0) {} // We can preserve non-critical-edgeness when we unify function exit nodes |