diff --git a/include/llvm/Module.h b/include/llvm/Module.h index 8e527d0960a..afb20d3df17 100644 --- a/include/llvm/Module.h +++ b/include/llvm/Module.h @@ -174,4 +174,9 @@ inline std::ostream &operator<<(std::ostream &O, const Module *M) { return O; } +inline std::ostream &operator<<(std::ostream &O, const Module &M) { + M.print(O); + return O; +} + #endif