[opaque pointer type] Avoid using pointee types to retrieve InlineAsm's function...
[oota-llvm.git] / include / llvm / IR / DiagnosticPrinter.h
index 721b1b4212e0692b0b2f621c9f9118b58b33fe27..1bcd73738b662f186915b0b5bdd9e913017b3f6c 100644 (file)
 // 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>
 
 namespace llvm {
 // Forward declarations.
+class Module;
 class raw_ostream;
+class SMDiagnostic;
 class StringRef;
 class Twine;
 class Value;
@@ -49,6 +51,10 @@ 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.
@@ -57,27 +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);
+  DiagnosticPrinter &operator<<(const Value &V) override;
+  DiagnosticPrinter &operator<<(const Module &M) override;
+
+  // Other types.
+  DiagnosticPrinter &operator<<(const SMDiagnostic &Diag) override;
 };
 } // End namespace llvm