clang-tools  7.0.0svn
QuerySession.h
Go to the documentation of this file.
1 //===--- QuerySession.h - clang-query ---------------------------*- C++ -*-===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 
10 #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_QUERY_QUERY_SESSION_H
11 #define LLVM_CLANG_TOOLS_EXTRA_CLANG_QUERY_QUERY_SESSION_H
12 
13 #include "Query.h"
14 #include "clang/ASTMatchers/Dynamic/VariantValue.h"
15 #include "llvm/ADT/ArrayRef.h"
16 #include "llvm/ADT/StringMap.h"
17 
18 namespace clang {
19 
20 class ASTUnit;
21 
22 namespace query {
23 
24 /// Represents the state for a particular clang-query session.
25 class QuerySession {
26 public:
27  QuerySession(llvm::ArrayRef<std::unique_ptr<ASTUnit>> ASTs)
28  : ASTs(ASTs), OutKind(OK_Diag), BindRoot(true), Terminate(false) {}
29 
30  llvm::ArrayRef<std::unique_ptr<ASTUnit>> ASTs;
32  bool BindRoot;
33  bool Terminate;
34  llvm::StringMap<ast_matchers::dynamic::VariantValue> NamedValues;
35 };
36 
37 } // namespace query
38 } // namespace clang
39 
40 #endif
Represents the state for a particular clang-query session.
Definition: QuerySession.h:25
QuerySession(llvm::ArrayRef< std::unique_ptr< ASTUnit >> ASTs)
Definition: QuerySession.h:27
llvm::ArrayRef< std::unique_ptr< ASTUnit > > ASTs
Definition: QuerySession.h:30
llvm::StringMap< ast_matchers::dynamic::VariantValue > NamedValues
Definition: QuerySession.h:34