14 #ifndef MLIR_TOOLS_MLIRQUERY_MATCHER_DIAGNOSTICS_H
15 #define MLIR_TOOLS_MLIRQUERY_MATCHER_DIAGNOSTICS_H
18 #include "llvm/ADT/ArrayRef.h"
19 #include "llvm/ADT/StringRef.h"
20 #include "llvm/ADT/Twine.h"
21 #include "llvm/Support/raw_ostream.h"
33 ArgStream(std::vector<std::string> *out) : out(out) {}
41 std::vector<std::string> *out;
50 void print(llvm::raw_ostream &os)
const;
56 std::vector<std::string> args;
61 std::vector<ContextFrame> contextStack;
65 std::vector<std::string>
args;
67 std::vector<Message> messages;
71 const llvm::Twine Prefix, llvm::raw_ostream &os)
const;
73 void printErrorContent(
const ErrorContent &content,
74 llvm::raw_ostream &os)
const;
76 std::vector<ContextFrame> contextStack;
77 std::vector<ErrorContent> errorValues;
ArgStream(std::vector< std::string > *out)
ArgStream & operator<<(const T &arg)
ArgStream addError(SourceRange range, ErrorType error)
void print(llvm::raw_ostream &os) const
std::vector< std::string > args