DiagnosticPrinter.h [plain text]
#ifndef LLVM_IR_DIAGNOSTICPRINTER_H
#define LLVM_IR_DIAGNOSTICPRINTER_H
#include <string>
namespace llvm {
class Module;
class raw_ostream;
class SMDiagnostic;
class StringRef;
class Twine;
class Value;
class DiagnosticPrinter {
public:
virtual ~DiagnosticPrinter() {}
virtual DiagnosticPrinter &operator<<(char C) = 0;
virtual DiagnosticPrinter &operator<<(unsigned char C) = 0;
virtual DiagnosticPrinter &operator<<(signed char C) = 0;
virtual DiagnosticPrinter &operator<<(StringRef Str) = 0;
virtual DiagnosticPrinter &operator<<(const char *Str) = 0;
virtual DiagnosticPrinter &operator<<(const std::string &Str) = 0;
virtual DiagnosticPrinter &operator<<(unsigned long N) = 0;
virtual DiagnosticPrinter &operator<<(long N) = 0;
virtual DiagnosticPrinter &operator<<(unsigned long long N) = 0;
virtual DiagnosticPrinter &operator<<(long long N) = 0;
virtual DiagnosticPrinter &operator<<(const void *P) = 0;
virtual DiagnosticPrinter &operator<<(unsigned int N) = 0;
virtual DiagnosticPrinter &operator<<(int N) = 0;
virtual DiagnosticPrinter &operator<<(double N) = 0;
virtual DiagnosticPrinter &operator<<(const Twine &Str) = 0;
virtual DiagnosticPrinter &operator<<(const Value &V) = 0;
virtual DiagnosticPrinter &operator<<(const Module &M) = 0;
virtual DiagnosticPrinter &operator<<(const SMDiagnostic &Diag) = 0;
};
class DiagnosticPrinterRawOStream : public DiagnosticPrinter {
protected:
raw_ostream &Stream;
public:
DiagnosticPrinterRawOStream(raw_ostream &Stream) : Stream(Stream) {}
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;
DiagnosticPrinter &operator<<(const Value &V) override;
DiagnosticPrinter &operator<<(const Module &M) override;
DiagnosticPrinter &operator<<(const SMDiagnostic &Diag) override;
};
}
#endif