diff options
author | Reid Spencer <reid@x10sys.com> | 2007-08-12 08:12:35 +0000 |
---|---|---|
committer | Reid Spencer <reid@x10sys.com> | 2007-08-12 08:12:35 +0000 |
commit | 6a677017f4aacee6399cf1d4ad7817e650f86f40 (patch) | |
tree | 091ab79822fefb238e55ea959e4c1a2c19f7e6cb /include/llvm/Assembly/PrintModulePass.h | |
parent | 6a2d6efdfe3fddeacda16ac43011fe53e2573074 (diff) | |
download | external_llvm-6a677017f4aacee6399cf1d4ad7817e650f86f40.zip external_llvm-6a677017f4aacee6399cf1d4ad7817e650f86f40.tar.gz external_llvm-6a677017f4aacee6399cf1d4ad7817e650f86f40.tar.bz2 |
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
Diffstat (limited to 'include/llvm/Assembly/PrintModulePass.h')
-rw-r--r-- | include/llvm/Assembly/PrintModulePass.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/include/llvm/Assembly/PrintModulePass.h b/include/llvm/Assembly/PrintModulePass.h index 0f65235..ed70e9d 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; |