diff options
Diffstat (limited to 'include/llvm/Analysis/Dominators.h')
-rw-r--r-- | include/llvm/Analysis/Dominators.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/llvm/Analysis/Dominators.h b/include/llvm/Analysis/Dominators.h index 939300f..f29ed83 100644 --- a/include/llvm/Analysis/Dominators.h +++ b/include/llvm/Analysis/Dominators.h @@ -144,6 +144,9 @@ public: /// print - Convert to human readable form /// virtual void print(std::ostream &OS, const Module* = 0) const; + void print(std::ostream *OS, const Module* M = 0) const { + if (OS) print(*OS, M); + } }; //===------------------------------------- @@ -234,6 +237,9 @@ public: /// print - Convert to human readable form /// virtual void print(std::ostream &OS, const Module* = 0) const; + void print(std::ostream *OS, const Module* M = 0) const { + if (OS) print(*OS, M); + } /// dominates - Return true if A dominates B. This performs the special /// checks necessary if A and B are in the same basic block. @@ -410,6 +416,9 @@ public: /// print - Convert to human readable form /// virtual void print(std::ostream &OS, const Module* = 0) const; + void print(std::ostream *OS, const Module* M = 0) const { + if (OS) print(*OS, M); + } }; //===------------------------------------- @@ -546,6 +555,9 @@ public: /// print - Convert to human readable form /// virtual void print(std::ostream &OS, const Module* = 0) const; + void print(std::ostream *OS, const Module* M = 0) const { + if (OS) print(*OS, M); + } protected: /// getNode - return the (Post)DominatorTree node for the specified basic /// block. This is the same as using operator[] on this class. @@ -635,6 +647,9 @@ public: /// print - Convert to human readable form /// virtual void print(std::ostream &OS, const Module* = 0) const; + void print(std::ostream *OS, const Module* M = 0) const { + if (OS) print(*OS, M); + } }; |