ARM: improve RTABI 4.2 conformance on Linux
[oota-llvm.git] / lib / IR / DiagnosticPrinter.cpp
index 04cd6c7e6f7ef5353ac8d45175ef28a32a5dbeb6..5e160266c8fe7f8e1bbd42e98f7947a0d3e574af 100644 (file)
@@ -13,6 +13,7 @@
 
 #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"
 
@@ -90,7 +91,7 @@ DiagnosticPrinter &DiagnosticPrinterRawOStream::operator<<(double N) {
 }
 
 DiagnosticPrinter &DiagnosticPrinterRawOStream::operator<<(const Twine &Str) {
-  Stream << Str.getSingleStringRef();
+  Str.print(Stream);
   return *this;
 }
 
@@ -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;
+}