IR: Add MDNode::getDistinct()
[oota-llvm.git] / lib / IR / DiagnosticPrinter.cpp
index d76f9f586a9e1af52988fa065afb981e8d424af0..f25fc20a197bf7ca618699838b4c105e4c3a013e 100644 (file)
@@ -7,12 +7,13 @@
 //
 //===----------------------------------------------------------------------===//
 //
-// This file defines the a diagnostic printer relying on raw_ostream.
+// This file defines a diagnostic printer relying on raw_ostream.
 //
 //===----------------------------------------------------------------------===//
 
 #include "llvm/ADT/Twine.h"
 #include "llvm/IR/DiagnosticPrinter.h"
+#include "llvm/IR/Module.h"
 #include "llvm/IR/Value.h"
 #include "llvm/Support/raw_ostream.h"
 
@@ -99,3 +100,8 @@ DiagnosticPrinter &DiagnosticPrinterRawOStream::operator<<(const Value &V) {
   Stream << V.getName();
   return *this;
 }
+
+DiagnosticPrinter &DiagnosticPrinterRawOStream::operator<<(const Module &M) {
+  Stream << M.getModuleIdentifier();
+  return *this;
+}