aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Analysis
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2008-09-04 17:05:41 +0000
committerDan Gohman <gohman@apple.com>2008-09-04 17:05:41 +0000
commitae73dc1448d25b02cabc7c64c86c64371453dda8 (patch)
treeaf8e2a48c6bdac1ac118d027226915ef67e8bdac /include/llvm/Analysis
parent79924eb6f5708a2ae36ba22b674b2d7bea3167e6 (diff)
downloadexternal_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/Analysis')
-rw-r--r--include/llvm/Analysis/Dominators.h6
-rw-r--r--include/llvm/Analysis/FindUsedTypes.h2
-rw-r--r--include/llvm/Analysis/IntervalPartition.h2
-rw-r--r--include/llvm/Analysis/LoopPass.h1
-rw-r--r--include/llvm/Analysis/MemoryDependenceAnalysis.h2
-rw-r--r--include/llvm/Analysis/PostDominators.h4
-rw-r--r--include/llvm/Analysis/ScalarEvolution.h2
7 files changed, 10 insertions, 9 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.