From ae73dc1448d25b02cabc7c64c86c64371453dda8 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Thu, 4 Sep 2008 17:05:41 +0000 Subject: 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 --- lib/Analysis/CFGPrinter.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'lib/Analysis/CFGPrinter.cpp') 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 : 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; -- cgit v1.1