diff options
Diffstat (limited to 'include/llvm/Module.h')
-rw-r--r-- | include/llvm/Module.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/llvm/Module.h b/include/llvm/Module.h index 195c73d..4cb6d27 100644 --- a/include/llvm/Module.h +++ b/include/llvm/Module.h @@ -295,8 +295,14 @@ public: /// @{ public: /// Print the module to an output stream + void print(llvm_ostream &OS) const { + if (OS.stream()) print(*OS.stream(), 0); + } void print(std::ostream &OS) const { print(OS, 0); } /// Print the module to an output stream with AssemblyAnnotationWriter. + void print(llvm_ostream &OS, AssemblyAnnotationWriter *AAW) const { + if (OS.stream()) print(*OS.stream(), AAW); + } void print(std::ostream &OS, AssemblyAnnotationWriter *AAW) const; /// Dump the module to std::cerr (for debugging). void dump() const; |