Add an overload for SourceMgr::PrintMessage that takes an existing diagnostic.
[oota-llvm.git] / include / llvm / Support / SourceMgr.h
index aee4744a592cbfd97d779b5f3490cb4cb488758f..30eccd99acbc63431fcf475e48e244c0c40b9432 100644 (file)
@@ -157,6 +157,13 @@ public:
                     ArrayRef<SMFixIt> FixIts = None,
                     bool ShowColors = true) const;
 
+  /// Emits a manually-constructed diagnostic to the given output stream.
+  ///
+  /// \param ShowColors Display colored messages if output is a terminal and
+  /// the default error handler is used.
+  void PrintMessage(raw_ostream &OS, const SMDiagnostic &Diagnostic,
+                    bool ShowColors = true) const;
+
   /// Return an SMDiagnostic at the specified location with the specified
   /// string.
   ///