aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/Pass.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/Pass.h')
-rw-r--r--include/llvm/Pass.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/llvm/Pass.h b/include/llvm/Pass.h
index 547ad24f33..30f1df9669 100644
--- a/include/llvm/Pass.h
+++ b/include/llvm/Pass.h
@@ -29,6 +29,7 @@
#ifndef LLVM_PASS_H
#define LLVM_PASS_H
+#include "llvm/Support/Streams.h"
#include <vector>
#include <map>
#include <iosfwd>
@@ -100,6 +101,9 @@ public:
/// provide the Module* in case the analysis doesn't need it it can just be
/// ignored.
///
+ void print(llvm_ostream &O, const Module *M) const {
+ if (O.stream()) print(*O.stream(), M);
+ }
virtual void print(std::ostream &O, const Module *M) const;
void dump() const; // dump - call print(std::cerr, 0);