blob: b4361003becb71db6a30e44a8f251db0d119b2fd [file] [log] [blame]
Peter Collingbourne8b1265b2013-11-08 00:08:23 +00001//===--- 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
Peter Collingbourne8b1265b2013-11-08 00:08:23 +000013#include "Query.h"
Samuel Benzaquen1f6066c2014-04-23 14:04:52 +000014#include "clang/ASTMatchers/Dynamic/VariantValue.h"
Chandler Carruth85e6e872014-01-07 20:05:01 +000015#include "llvm/ADT/ArrayRef.h"
Samuel Benzaquen1f6066c2014-04-23 14:04:52 +000016#include "llvm/ADT/StringMap.h"
Peter Collingbourne8b1265b2013-11-08 00:08:23 +000017
18namespace clang {
19
20class ASTUnit;
21
22namespace query {
23
24/// Represents the state for a particular clang-query session.
25class QuerySession {
26public:
27 QuerySession(llvm::ArrayRef<ASTUnit *> ASTs)
28 : ASTs(ASTs), OutKind(OK_Diag), BindRoot(true) {}
29
30 llvm::ArrayRef<ASTUnit *> ASTs;
31 OutputKind OutKind;
32 bool BindRoot;
Samuel Benzaquen1f6066c2014-04-23 14:04:52 +000033 llvm::StringMap<ast_matchers::dynamic::VariantValue> NamedValues;
Peter Collingbourne8b1265b2013-11-08 00:08:23 +000034};
35
36} // namespace query
37} // namespace clang
38
39#endif