9 #ifndef MLIR_TOOLS_MLIRQUERY_QUERY_H
10 #define MLIR_TOOLS_MLIRQUERY_QUERY_H
14 #include "llvm/ADT/IntrusiveRefCntPtr.h"
15 #include "llvm/ADT/StringRef.h"
16 #include "llvm/LineEditor/LineEditor.h"
25 struct Query : llvm::RefCountedBase<Query> {
37 typedef llvm::IntrusiveRefCntPtr<Query>
QueryRef;
41 std::vector<llvm::LineEditor::Completion>
QueryRef parse(llvm::StringRef line, const QuerySession &qs)
llvm::IntrusiveRefCntPtr< Query > QueryRef
std::vector< llvm::LineEditor::Completion > complete(llvm::StringRef line, size_t pos, const QuerySession &qs)
This class represents an efficient way to signal success or failure.
mlir::LogicalResult run(llvm::raw_ostream &os, QuerySession &qs) const override
static bool classof(const Query *query)
static bool classof(const Query *query)
InvalidQuery(const llvm::Twine &errStr)
mlir::LogicalResult run(llvm::raw_ostream &os, QuerySession &qs) const override
MatchQuery(llvm::StringRef source, const matcher::DynMatcher &matcher)
mlir::LogicalResult run(llvm::raw_ostream &os, QuerySession &qs) const override
const matcher::DynMatcher matcher
static bool classof(const Query *query)
static bool classof(const Query *query)
mlir::LogicalResult run(llvm::raw_ostream &os, QuerySession &qs) const override
llvm::StringRef remainingContent
virtual mlir::LogicalResult run(llvm::raw_ostream &os, QuerySession &qs) const =0
mlir::LogicalResult run(llvm::raw_ostream &os, QuerySession &qs) const override
static bool classof(const Query *query)