Drop support for dematerializing.
[oota-llvm.git] / include / llvm / IR / DiagnosticPrinter.h
index 6177b7fe10a052a6db08bf489a40487760dcd329..1bcd73738b662f186915b0b5bdd9e913017b3f6c 100644 (file)
@@ -13,8 +13,8 @@
 // on their needs.
 //===----------------------------------------------------------------------===//
 
-#ifndef LLVM_SUPPORT_DIAGNOSTICPRINTER_H
-#define LLVM_SUPPORT_DIAGNOSTICPRINTER_H
+#ifndef LLVM_IR_DIAGNOSTICPRINTER_H
+#define LLVM_IR_DIAGNOSTICPRINTER_H
 
 #include <string>
 
@@ -22,6 +22,7 @@ namespace llvm {
 // Forward declarations.
 class Module;
 class raw_ostream;
+class SMDiagnostic;
 class StringRef;
 class Twine;
 class Value;
@@ -51,6 +52,9 @@ public:
   // IR related types.
   virtual DiagnosticPrinter &operator<<(const Value &V) = 0;
   virtual DiagnosticPrinter &operator<<(const Module &M) = 0;
+
+  // Other types.
+  virtual DiagnosticPrinter &operator<<(const SMDiagnostic &Diag) = 0;
 };
 
 /// \brief Basic diagnostic printer that uses an underlying raw_ostream.
@@ -59,28 +63,31 @@ protected:
   raw_ostream &Stream;
 
 public:
-  DiagnosticPrinterRawOStream(raw_ostream &Stream) : Stream(Stream) {};
+  DiagnosticPrinterRawOStream(raw_ostream &Stream) : Stream(Stream) {}
 
   // Simple types.
-  virtual DiagnosticPrinter &operator<<(char C);
-  virtual DiagnosticPrinter &operator<<(unsigned char C);
-  virtual DiagnosticPrinter &operator<<(signed char C);
-  virtual DiagnosticPrinter &operator<<(StringRef Str);
-  virtual DiagnosticPrinter &operator<<(const char *Str);
-  virtual DiagnosticPrinter &operator<<(const std::string &Str);
-  virtual DiagnosticPrinter &operator<<(unsigned long N);
-  virtual DiagnosticPrinter &operator<<(long N);
-  virtual DiagnosticPrinter &operator<<(unsigned long long N);
-  virtual DiagnosticPrinter &operator<<(long long N);
-  virtual DiagnosticPrinter &operator<<(const void *P);
-  virtual DiagnosticPrinter &operator<<(unsigned int N);
-  virtual DiagnosticPrinter &operator<<(int N);
-  virtual DiagnosticPrinter &operator<<(double N);
-  virtual DiagnosticPrinter &operator<<(const Twine &Str);
+  DiagnosticPrinter &operator<<(char C) override;
+  DiagnosticPrinter &operator<<(unsigned char C) override;
+  DiagnosticPrinter &operator<<(signed char C) override;
+  DiagnosticPrinter &operator<<(StringRef Str) override;
+  DiagnosticPrinter &operator<<(const char *Str) override;
+  DiagnosticPrinter &operator<<(const std::string &Str) override;
+  DiagnosticPrinter &operator<<(unsigned long N) override;
+  DiagnosticPrinter &operator<<(long N) override;
+  DiagnosticPrinter &operator<<(unsigned long long N) override;
+  DiagnosticPrinter &operator<<(long long N) override;
+  DiagnosticPrinter &operator<<(const void *P) override;
+  DiagnosticPrinter &operator<<(unsigned int N) override;
+  DiagnosticPrinter &operator<<(int N) override;
+  DiagnosticPrinter &operator<<(double N) override;
+  DiagnosticPrinter &operator<<(const Twine &Str) override;
 
   // IR related types.
-  virtual DiagnosticPrinter &operator<<(const Value &V);
-  virtual DiagnosticPrinter &operator<<(const Module &M);
+  DiagnosticPrinter &operator<<(const Value &V) override;
+  DiagnosticPrinter &operator<<(const Module &M) override;
+
+  // Other types.
+  DiagnosticPrinter &operator<<(const SMDiagnostic &Diag) override;
 };
 } // End namespace llvm