From 276222a5ae189ed5c6a2afb248d4c8f0335585b4 Mon Sep 17 00:00:00 2001 From: Reid Spencer Date: Sun, 12 Aug 2007 08:12:35 +0000 Subject: Change casts from old style to new style. This helps document the details better, gives the compiler a chance to validate the cast and reduces warnings if the user turns on -Wold-style-cast option. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41033 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Assembly/PrintModulePass.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'include/llvm/Assembly/PrintModulePass.h') diff --git a/include/llvm/Assembly/PrintModulePass.h b/include/llvm/Assembly/PrintModulePass.h index 0f65235d77..ed70e9dc3b 100644 --- a/include/llvm/Assembly/PrintModulePass.h +++ b/include/llvm/Assembly/PrintModulePass.h @@ -29,9 +29,10 @@ class PrintModulePass : public ModulePass { bool DeleteStream; // Delete the ostream in our dtor? public: static char ID; - PrintModulePass() : ModulePass((intptr_t)&ID), Out(&cerr), DeleteStream(false) {} + PrintModulePass() : ModulePass(intptr_t(&ID)), Out(&cerr), + DeleteStream(false) {} PrintModulePass(OStream *o, bool DS = false) - : ModulePass((intptr_t)&ID), Out(o), DeleteStream(DS) {} + : ModulePass(intptr_t(&ID)), Out(o), DeleteStream(DS) {} ~PrintModulePass() { if (DeleteStream) delete Out; @@ -53,11 +54,11 @@ class PrintFunctionPass : public FunctionPass { bool DeleteStream; // Delete the ostream in our dtor? public: static char ID; - PrintFunctionPass() : FunctionPass((intptr_t)&ID), Banner(""), Out(&cerr), + PrintFunctionPass() : FunctionPass(intptr_t(&ID)), Banner(""), Out(&cerr), DeleteStream(false) {} PrintFunctionPass(const std::string &B, OStream *o = &cout, bool DS = false) - : FunctionPass((intptr_t)&ID), Banner(B), Out(o), DeleteStream(DS) {} + : FunctionPass(intptr_t(&ID)), Banner(B), Out(o), DeleteStream(DS) {} inline ~PrintFunctionPass() { if (DeleteStream) delete Out; -- cgit v1.2.3