diff --git a/llvm/include/llvm/Module.h b/llvm/include/llvm/Module.h index 8e527d0960ae..afb20d3df17b 100644 --- a/llvm/include/llvm/Module.h +++ b/llvm/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