//
//===----------------------------------------------------------------------===//
//
-// 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"
}
DiagnosticPrinter &DiagnosticPrinterRawOStream::operator<<(const Twine &Str) {
- Stream << Str.getSingleStringRef();
+ Str.print(Stream);
return *this;
}
Stream << V.getName();
return *this;
}
+
+DiagnosticPrinter &DiagnosticPrinterRawOStream::operator<<(const Module &M) {
+ Stream << M.getModuleIdentifier();
+ return *this;
+}