aboutsummaryrefslogtreecommitdiffstats
path: root/lib/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 /lib/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 'lib/Analysis')
-rw-r--r--lib/Analysis/AliasAnalysisCounter.cpp2
-rw-r--r--lib/Analysis/AliasAnalysisEvaluator.cpp2
-rw-r--r--lib/Analysis/AliasDebugger.cpp2
-rw-r--r--lib/Analysis/AliasSetTracker.cpp2
-rw-r--r--lib/Analysis/BasicAliasAnalysis.cpp6
-rw-r--r--lib/Analysis/CFGPrinter.cpp10
-rw-r--r--lib/Analysis/IPA/Andersens.cpp2
-rw-r--r--lib/Analysis/IPA/CallGraph.cpp2
-rw-r--r--lib/Analysis/IPA/CallGraphSCCPass.cpp2
-rw-r--r--lib/Analysis/IPA/GlobalsModRef.cpp2
-rw-r--r--lib/Analysis/InstCount.cpp2
-rw-r--r--lib/Analysis/IntervalPartition.cpp2
-rw-r--r--lib/Analysis/LoopPass.cpp2
-rw-r--r--lib/Analysis/ProfileInfo.cpp2
-rw-r--r--lib/Analysis/ProfileInfoLoaderPass.cpp2
15 files changed, 21 insertions, 21 deletions
diff --git a/lib/Analysis/AliasAnalysisCounter.cpp b/lib/Analysis/AliasAnalysisCounter.cpp
index de40ad8..4362d7d 100644
--- a/lib/Analysis/AliasAnalysisCounter.cpp
+++ b/lib/Analysis/AliasAnalysisCounter.cpp
@@ -35,7 +35,7 @@ namespace {
Module *M;
public:
static char ID; // Class identification, replacement for typeinfo
- AliasAnalysisCounter() : ModulePass((intptr_t) &ID) {
+ AliasAnalysisCounter() : ModulePass(&ID) {
No = May = Must = 0;
NoMR = JustRef = JustMod = MR = 0;
}
diff --git a/lib/Analysis/AliasAnalysisEvaluator.cpp b/lib/Analysis/AliasAnalysisEvaluator.cpp
index af15d0f..c7a86d3 100644
--- a/lib/Analysis/AliasAnalysisEvaluator.cpp
+++ b/lib/Analysis/AliasAnalysisEvaluator.cpp
@@ -52,7 +52,7 @@ namespace {
public:
static char ID; // Pass identification, replacement for typeid
- AAEval() : FunctionPass((intptr_t)&ID) {}
+ AAEval() : FunctionPass(&ID) {}
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
AU.addRequired<AliasAnalysis>();
diff --git a/lib/Analysis/AliasDebugger.cpp b/lib/Analysis/AliasDebugger.cpp
index 06a43b1..0bbd739 100644
--- a/lib/Analysis/AliasDebugger.cpp
+++ b/lib/Analysis/AliasDebugger.cpp
@@ -41,7 +41,7 @@ namespace {
public:
static char ID; // Class identification, replacement for typeinfo
- AliasDebugger() : ModulePass((intptr_t)&ID) {}
+ AliasDebugger() : ModulePass(&ID) {}
bool runOnModule(Module &M) {
InitializeAliasAnalysis(this); // set up super class
diff --git a/lib/Analysis/AliasSetTracker.cpp b/lib/Analysis/AliasSetTracker.cpp
index 398bf5a..608da93 100644
--- a/lib/Analysis/AliasSetTracker.cpp
+++ b/lib/Analysis/AliasSetTracker.cpp
@@ -564,7 +564,7 @@ namespace {
AliasSetTracker *Tracker;
public:
static char ID; // Pass identification, replacement for typeid
- AliasSetPrinter() : FunctionPass((intptr_t)&ID) {}
+ AliasSetPrinter() : FunctionPass(&ID) {}
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
AU.setPreservesAll();
diff --git a/lib/Analysis/BasicAliasAnalysis.cpp b/lib/Analysis/BasicAliasAnalysis.cpp
index b417a48..7d43093 100644
--- a/lib/Analysis/BasicAliasAnalysis.cpp
+++ b/lib/Analysis/BasicAliasAnalysis.cpp
@@ -208,8 +208,8 @@ namespace {
///
struct VISIBILITY_HIDDEN NoAA : public ImmutablePass, public AliasAnalysis {
static char ID; // Class identification, replacement for typeinfo
- NoAA() : ImmutablePass((intptr_t)&ID) {}
- explicit NoAA(intptr_t PID) : ImmutablePass(PID) { }
+ NoAA() : ImmutablePass(&ID) {}
+ explicit NoAA(void *PID) : ImmutablePass(PID) { }
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
AU.addRequired<TargetData>();
@@ -269,7 +269,7 @@ namespace {
/// derives from the NoAA class.
struct VISIBILITY_HIDDEN BasicAliasAnalysis : public NoAA {
static char ID; // Class identification, replacement for typeinfo
- BasicAliasAnalysis() : NoAA((intptr_t)&ID) { }
+ BasicAliasAnalysis() : NoAA(&ID) {}
AliasResult alias(const Value *V1, unsigned V1Size,
const Value *V2, unsigned V2Size);
diff --git a/lib/Analysis/CFGPrinter.cpp b/lib/Analysis/CFGPrinter.cpp
index e20a0a2..46d3930 100644
--- a/lib/Analysis/CFGPrinter.cpp
+++ b/lib/Analysis/CFGPrinter.cpp
@@ -92,7 +92,7 @@ struct DOTGraphTraits<const Function*> : public DefaultDOTGraphTraits {
namespace {
struct VISIBILITY_HIDDEN CFGViewer : public FunctionPass {
static char ID; // Pass identifcation, replacement for typeid
- CFGViewer() : FunctionPass((intptr_t)&ID) {}
+ CFGViewer() : FunctionPass(&ID) {}
virtual bool runOnFunction(Function &F) {
F.viewCFG();
@@ -114,7 +114,7 @@ V0("view-cfg", "View CFG of function", false, true);
namespace {
struct VISIBILITY_HIDDEN CFGOnlyViewer : public FunctionPass {
static char ID; // Pass identifcation, replacement for typeid
- CFGOnlyViewer() : FunctionPass((intptr_t)&ID) {}
+ CFGOnlyViewer() : FunctionPass(&ID) {}
virtual bool runOnFunction(Function &F) {
CFGOnly = true;
@@ -139,8 +139,8 @@ V1("view-cfg-only",
namespace {
struct VISIBILITY_HIDDEN CFGPrinter : public FunctionPass {
static char ID; // Pass identification, replacement for typeid
- CFGPrinter() : FunctionPass((intptr_t)&ID) {}
- explicit CFGPrinter(intptr_t pid) : FunctionPass(pid) {}
+ CFGPrinter() : FunctionPass(&ID) {}
+ explicit CFGPrinter(void *pid) : FunctionPass(pid) {}
virtual bool runOnFunction(Function &F) {
std::string Filename = "cfg." + F.getName() + ".dot";
@@ -170,7 +170,7 @@ P1("print-cfg", "Print CFG of function to 'dot' file", false, true);
namespace {
struct VISIBILITY_HIDDEN CFGOnlyPrinter : public CFGPrinter {
static char ID; // Pass identification, replacement for typeid
- CFGOnlyPrinter() : CFGPrinter((intptr_t)&ID) {}
+ CFGOnlyPrinter() : CFGPrinter(&ID) {}
virtual bool runOnFunction(Function &F) {
bool OldCFGOnly = CFGOnly;
CFGOnly = true;
diff --git a/lib/Analysis/IPA/Andersens.cpp b/lib/Analysis/IPA/Andersens.cpp
index c6075e1..9e07189 100644
--- a/lib/Analysis/IPA/Andersens.cpp
+++ b/lib/Analysis/IPA/Andersens.cpp
@@ -431,7 +431,7 @@ namespace {
public:
static char ID;
- Andersens() : ModulePass((intptr_t)&ID) {}
+ Andersens() : ModulePass(&ID) {}
bool runOnModule(Module &M) {
InitializeAliasAnalysis(this);
diff --git a/lib/Analysis/IPA/CallGraph.cpp b/lib/Analysis/IPA/CallGraph.cpp
index 19d0fd5..5616ee9 100644
--- a/lib/Analysis/IPA/CallGraph.cpp
+++ b/lib/Analysis/IPA/CallGraph.cpp
@@ -50,7 +50,7 @@ class VISIBILITY_HIDDEN BasicCallGraph : public CallGraph, public ModulePass {
public:
static char ID; // Class identification, replacement for typeinfo
- BasicCallGraph() : ModulePass((intptr_t)&ID), Root(0),
+ BasicCallGraph() : ModulePass(&ID), Root(0),
ExternalCallingNode(0), CallsExternalNode(0) {}
// runOnModule - Compute the call graph for the specified module.
diff --git a/lib/Analysis/IPA/CallGraphSCCPass.cpp b/lib/Analysis/IPA/CallGraphSCCPass.cpp
index 4a0e4cf..b8343cf 100644
--- a/lib/Analysis/IPA/CallGraphSCCPass.cpp
+++ b/lib/Analysis/IPA/CallGraphSCCPass.cpp
@@ -34,7 +34,7 @@ class CGPassManager : public ModulePass, public PMDataManager {
public:
static char ID;
explicit CGPassManager(int Depth)
- : ModulePass((intptr_t)&ID), PMDataManager(Depth) { }
+ : ModulePass(&ID), PMDataManager(Depth) { }
/// run - Execute all of the passes scheduled for execution. Keep track of
/// whether any of the passes modifies the module, and if so, return true.
diff --git a/lib/Analysis/IPA/GlobalsModRef.cpp b/lib/Analysis/IPA/GlobalsModRef.cpp
index 9a7580b..3583f8d 100644
--- a/lib/Analysis/IPA/GlobalsModRef.cpp
+++ b/lib/Analysis/IPA/GlobalsModRef.cpp
@@ -88,7 +88,7 @@ namespace {
public:
static char ID;
- GlobalsModRef() : ModulePass((intptr_t)&ID) {}
+ GlobalsModRef() : ModulePass(&ID) {}
bool runOnModule(Module &M) {
InitializeAliasAnalysis(this); // set up super class
diff --git a/lib/Analysis/InstCount.cpp b/lib/Analysis/InstCount.cpp
index 5f33a60..2dea7b3 100644
--- a/lib/Analysis/InstCount.cpp
+++ b/lib/Analysis/InstCount.cpp
@@ -52,7 +52,7 @@ namespace {
}
public:
static char ID; // Pass identification, replacement for typeid
- InstCount() : FunctionPass((intptr_t)&ID) {}
+ InstCount() : FunctionPass(&ID) {}
virtual bool runOnFunction(Function &F);
diff --git a/lib/Analysis/IntervalPartition.cpp b/lib/Analysis/IntervalPartition.cpp
index adb6e9d..cb8a85d 100644
--- a/lib/Analysis/IntervalPartition.cpp
+++ b/lib/Analysis/IntervalPartition.cpp
@@ -91,7 +91,7 @@ bool IntervalPartition::runOnFunction(Function &F) {
// distinguish it from a copy constructor. Always pass in false for now.
//
IntervalPartition::IntervalPartition(IntervalPartition &IP, bool)
- : FunctionPass((intptr_t) &ID) {
+ : FunctionPass(&ID) {
assert(IP.getRootInterval() && "Cannot operate on empty IntervalPartitions!");
// Pass false to intervals_begin because we take ownership of it's memory
diff --git a/lib/Analysis/LoopPass.cpp b/lib/Analysis/LoopPass.cpp
index b9e5f99..7ebd4d3 100644
--- a/lib/Analysis/LoopPass.cpp
+++ b/lib/Analysis/LoopPass.cpp
@@ -25,7 +25,7 @@ char LPPassManager::ID = 0;
/// LPPassManager manages FPPassManagers and CalLGraphSCCPasses.
LPPassManager::LPPassManager(int Depth)
- : FunctionPass((intptr_t)&ID), PMDataManager(Depth) {
+ : FunctionPass(&ID), PMDataManager(Depth) {
skipThisLoop = false;
redoThisLoop = false;
LI = NULL;
diff --git a/lib/Analysis/ProfileInfo.cpp b/lib/Analysis/ProfileInfo.cpp
index 047491b..a0965b6 100644
--- a/lib/Analysis/ProfileInfo.cpp
+++ b/lib/Analysis/ProfileInfo.cpp
@@ -85,7 +85,7 @@ namespace {
struct VISIBILITY_HIDDEN NoProfileInfo
: public ImmutablePass, public ProfileInfo {
static char ID; // Class identification, replacement for typeinfo
- NoProfileInfo() : ImmutablePass((intptr_t)&ID) {}
+ NoProfileInfo() : ImmutablePass(&ID) {}
};
} // End of anonymous namespace
diff --git a/lib/Analysis/ProfileInfoLoaderPass.cpp b/lib/Analysis/ProfileInfoLoaderPass.cpp
index b2fa9e4..0a8a87b 100644
--- a/lib/Analysis/ProfileInfoLoaderPass.cpp
+++ b/lib/Analysis/ProfileInfoLoaderPass.cpp
@@ -34,7 +34,7 @@ namespace {
public:
static char ID; // Class identification, replacement for typeinfo
explicit LoaderPass(const std::string &filename = "")
- : ModulePass((intptr_t)&ID), Filename(filename) {
+ : ModulePass(&ID), Filename(filename) {
if (filename.empty()) Filename = ProfileInfoFilename;
}