summaryrefslogtreecommitdiff
path: root/include/llvm/Assembly/PrintModulePass.h
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2007-08-12 08:12:35 +0000
committerReid Spencer <rspencer@reidspencer.com>2007-08-12 08:12:35 +0000
commit276222a5ae189ed5c6a2afb248d4c8f0335585b4 (patch)
tree091ab79822fefb238e55ea959e4c1a2c19f7e6cb /include/llvm/Assembly/PrintModulePass.h
parent98147a306e9b3be6d52ad26f7836b89f46be99cb (diff)
downloadllvm-276222a5ae189ed5c6a2afb248d4c8f0335585b4.tar.gz
llvm-276222a5ae189ed5c6a2afb248d4c8f0335585b4.tar.bz2
llvm-276222a5ae189ed5c6a2afb248d4c8f0335585b4.tar.xz
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.h9
1 files changed, 5 insertions, 4 deletions
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;