9 #ifndef MLIR_TOOLS_MLIRQUERY_QUERY_H
10 #define MLIR_TOOLS_MLIRQUERY_QUERY_H
13 #include "llvm/ADT/IntrusiveRefCntPtr.h"
14 #include "llvm/ADT/StringRef.h"
15 #include "llvm/LineEditor/LineEditor.h"
24 struct Query : llvm::RefCountedBase<Query> {
29 virtual llvm::LogicalResult
run(llvm::raw_ostream &os,
36 typedef llvm::IntrusiveRefCntPtr<Query>
QueryRef;
40 std::vector<llvm::LineEditor::Completion>
47 llvm::LogicalResult
run(llvm::raw_ostream &os,
60 llvm::LogicalResult
run(llvm::raw_ostream &os,
71 llvm::LogicalResult
run(llvm::raw_ostream &os,
82 llvm::LogicalResult
run(llvm::raw_ostream &os,
94 llvm::LogicalResult
run(llvm::raw_ostream &os,
FailureOr< Attribute > query(Operation *op, ArrayRef< DataLayoutEntryKey > keys, bool emitError=false)
Perform a DLTI-query at op, recursively querying each key of keys on query interface-implementing att...
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)
llvm::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)
llvm::LogicalResult run(llvm::raw_ostream &os, QuerySession &qs) const override
llvm::LogicalResult run(llvm::raw_ostream &os, QuerySession &qs) const override
MatchQuery(llvm::StringRef source, const matcher::DynMatcher &matcher)
const matcher::DynMatcher matcher
static bool classof(const Query *query)
llvm::LogicalResult run(llvm::raw_ostream &os, QuerySession &qs) const override
static bool classof(const Query *query)
virtual llvm::LogicalResult run(llvm::raw_ostream &os, QuerySession &qs) const =0
llvm::StringRef remainingContent
llvm::LogicalResult run(llvm::raw_ostream &os, QuerySession &qs) const override
static bool classof(const Query *query)