diff options
author | Dan Gohman <gohman@apple.com> | 2009-02-18 05:09:16 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2009-02-18 05:09:16 +0000 |
commit | 865f006bb45a609e1cb6acb653af3fe5442ee4dc (patch) | |
tree | 0071ecd9b57dcc912f9cbfee237f2ed3e1335582 /tools | |
parent | 38ad0191e9d1a9887ee355afe12d22b38a608f72 (diff) | |
download | llvm-865f006bb45a609e1cb6acb653af3fe5442ee4dc.tar.gz |
Eliminate several more unnecessary intptr_t casts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64888 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools')
-rw-r--r-- | tools/bugpoint/TestPasses.cpp | 4 | ||||
-rw-r--r-- | tools/opt/AnalysisWrappers.cpp | 4 | ||||
-rw-r--r-- | tools/opt/GraphPrinters.cpp | 4 | ||||
-rw-r--r-- | tools/opt/PrintSCC.cpp | 4 | ||||
-rw-r--r-- | tools/opt/opt.cpp | 10 |
5 files changed, 13 insertions, 13 deletions
diff --git a/tools/bugpoint/TestPasses.cpp b/tools/bugpoint/TestPasses.cpp index db7544b57a62..900bf632a83b 100644 --- a/tools/bugpoint/TestPasses.cpp +++ b/tools/bugpoint/TestPasses.cpp @@ -27,7 +27,7 @@ namespace { class CrashOnCalls : public BasicBlockPass { public: static char ID; // Pass ID, replacement for typeid - CrashOnCalls() : BasicBlockPass((intptr_t)&ID) {} + CrashOnCalls() : BasicBlockPass(&ID) {} private: virtual void getAnalysisUsage(AnalysisUsage &AU) const { AU.setPreservesAll(); @@ -54,7 +54,7 @@ namespace { class DeleteCalls : public BasicBlockPass { public: static char ID; // Pass ID, replacement for typeid - DeleteCalls() : BasicBlockPass((intptr_t)&ID) {} + DeleteCalls() : BasicBlockPass(&ID) {} private: bool runOnBasicBlock(BasicBlock &BB) { for (BasicBlock::iterator I = BB.begin(), E = BB.end(); I != E; ++I) diff --git a/tools/opt/AnalysisWrappers.cpp b/tools/opt/AnalysisWrappers.cpp index 94cca50d63d1..631a0ddbfb19 100644 --- a/tools/opt/AnalysisWrappers.cpp +++ b/tools/opt/AnalysisWrappers.cpp @@ -31,7 +31,7 @@ namespace { /// or handle in alias analyses. struct ExternalFunctionsPassedConstants : public ModulePass { static char ID; // Pass ID, replacement for typeid - ExternalFunctionsPassedConstants() : ModulePass((intptr_t)&ID) {} + ExternalFunctionsPassedConstants() : ModulePass(&ID) {} virtual bool runOnModule(Module &M) { for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I) if (I->isDeclaration()) { @@ -70,7 +70,7 @@ namespace { struct CallGraphPrinter : public ModulePass { static char ID; // Pass ID, replacement for typeid - CallGraphPrinter() : ModulePass((intptr_t)&ID) {} + CallGraphPrinter() : ModulePass(&ID) {} virtual void getAnalysisUsage(AnalysisUsage &AU) const { AU.setPreservesAll(); diff --git a/tools/opt/GraphPrinters.cpp b/tools/opt/GraphPrinters.cpp index 31515c899316..a52baf7dae3c 100644 --- a/tools/opt/GraphPrinters.cpp +++ b/tools/opt/GraphPrinters.cpp @@ -62,7 +62,7 @@ namespace llvm { namespace { struct CallGraphPrinter : public ModulePass { static char ID; // Pass ID, replacement for typeid - CallGraphPrinter() : ModulePass((intptr_t)&ID) {} + CallGraphPrinter() : ModulePass(&ID) {} virtual bool runOnModule(Module &M) { WriteGraphToFile(std::cerr, "callgraph", &getAnalysis<CallGraph>()); @@ -91,7 +91,7 @@ namespace { class DomInfoPrinter : public FunctionPass { public: static char ID; // Pass identification, replacement for typeid - DomInfoPrinter() : FunctionPass((intptr_t)&ID) {} + DomInfoPrinter() : FunctionPass(&ID) {} virtual void getAnalysisUsage(AnalysisUsage &AU) const { AU.setPreservesAll(); diff --git a/tools/opt/PrintSCC.cpp b/tools/opt/PrintSCC.cpp index f314baaba937..be652644a6b5 100644 --- a/tools/opt/PrintSCC.cpp +++ b/tools/opt/PrintSCC.cpp @@ -36,7 +36,7 @@ using namespace llvm; namespace { struct CFGSCC : public FunctionPass { static char ID; // Pass identification, replacement for typeid - CFGSCC() : FunctionPass((intptr_t)&ID) {} + CFGSCC() : FunctionPass(&ID) {} bool runOnFunction(Function& func); void print(std::ostream &O, const Module* = 0) const { } @@ -48,7 +48,7 @@ namespace { struct CallGraphSCC : public ModulePass { static char ID; // Pass identification, replacement for typeid - CallGraphSCC() : ModulePass((intptr_t)&ID) {} + CallGraphSCC() : ModulePass(&ID) {} // run - Print out SCCs in the call graph for the specified module. bool runOnModule(Module &M); diff --git a/tools/opt/opt.cpp b/tools/opt/opt.cpp index b46f7c9188c0..680353ad2352 100644 --- a/tools/opt/opt.cpp +++ b/tools/opt/opt.cpp @@ -122,7 +122,7 @@ struct CallGraphSCCPassPrinter : public CallGraphSCCPass { static char ID; const PassInfo *PassToPrint; CallGraphSCCPassPrinter(const PassInfo *PI) : - CallGraphSCCPass((intptr_t)&ID), PassToPrint(PI) {} + CallGraphSCCPass(&ID), PassToPrint(PI) {} virtual bool runOnSCC(const std::vector<CallGraphNode *>&SCC) { if (!Quiet) { @@ -151,7 +151,7 @@ char CallGraphSCCPassPrinter::ID = 0; struct ModulePassPrinter : public ModulePass { static char ID; const PassInfo *PassToPrint; - ModulePassPrinter(const PassInfo *PI) : ModulePass((intptr_t)&ID), + ModulePassPrinter(const PassInfo *PI) : ModulePass(&ID), PassToPrint(PI) {} virtual bool runOnModule(Module &M) { @@ -176,7 +176,7 @@ char ModulePassPrinter::ID = 0; struct FunctionPassPrinter : public FunctionPass { const PassInfo *PassToPrint; static char ID; - FunctionPassPrinter(const PassInfo *PI) : FunctionPass((intptr_t)&ID), + FunctionPassPrinter(const PassInfo *PI) : FunctionPass(&ID), PassToPrint(PI) {} virtual bool runOnFunction(Function &F) { @@ -203,7 +203,7 @@ struct LoopPassPrinter : public LoopPass { static char ID; const PassInfo *PassToPrint; LoopPassPrinter(const PassInfo *PI) : - LoopPass((intptr_t)&ID), PassToPrint(PI) {} + LoopPass(&ID), PassToPrint(PI) {} virtual bool runOnLoop(Loop *L, LPPassManager &LPM) { if (!Quiet) { @@ -229,7 +229,7 @@ struct BasicBlockPassPrinter : public BasicBlockPass { const PassInfo *PassToPrint; static char ID; BasicBlockPassPrinter(const PassInfo *PI) - : BasicBlockPass((intptr_t)&ID), PassToPrint(PI) {} + : BasicBlockPass(&ID), PassToPrint(PI) {} virtual bool runOnBasicBlock(BasicBlock &BB) { if (!Quiet) { |