2013-11-08 08:08:23 +08:00
|
|
|
//===--- QuerySession.h - clang-query ---------------------------*- C++ -*-===//
|
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_QUERY_QUERY_SESSION_H
|
|
|
|
#define LLVM_CLANG_TOOLS_EXTRA_CLANG_QUERY_QUERY_SESSION_H
|
|
|
|
|
|
|
|
#include "Query.h"
|
2014-04-23 22:04:52 +08:00
|
|
|
#include "clang/ASTMatchers/Dynamic/VariantValue.h"
|
2014-01-08 04:05:01 +08:00
|
|
|
#include "llvm/ADT/ArrayRef.h"
|
2014-04-23 22:04:52 +08:00
|
|
|
#include "llvm/ADT/StringMap.h"
|
2013-11-08 08:08:23 +08:00
|
|
|
|
|
|
|
namespace clang {
|
|
|
|
|
|
|
|
class ASTUnit;
|
|
|
|
|
|
|
|
namespace query {
|
|
|
|
|
|
|
|
/// Represents the state for a particular clang-query session.
|
|
|
|
class QuerySession {
|
|
|
|
public:
|
2014-04-25 23:06:18 +08:00
|
|
|
QuerySession(llvm::ArrayRef<std::unique_ptr<ASTUnit>> ASTs)
|
2018-10-25 04:33:55 +08:00
|
|
|
: ASTs(ASTs), PrintOutput(false), DiagOutput(true),
|
|
|
|
DetailedASTOutput(false), BindRoot(true), PrintMatcher(false),
|
2018-10-20 17:13:59 +08:00
|
|
|
Terminate(false) {}
|
2013-11-08 08:08:23 +08:00
|
|
|
|
2014-04-25 23:06:18 +08:00
|
|
|
llvm::ArrayRef<std::unique_ptr<ASTUnit>> ASTs;
|
2018-10-25 04:33:55 +08:00
|
|
|
|
|
|
|
bool PrintOutput;
|
|
|
|
bool DiagOutput;
|
|
|
|
bool DetailedASTOutput;
|
|
|
|
|
2013-11-08 08:08:23 +08:00
|
|
|
bool BindRoot;
|
2018-10-20 17:13:59 +08:00
|
|
|
bool PrintMatcher;
|
2015-08-06 19:56:57 +08:00
|
|
|
bool Terminate;
|
2014-04-23 22:04:52 +08:00
|
|
|
llvm::StringMap<ast_matchers::dynamic::VariantValue> NamedValues;
|
2013-11-08 08:08:23 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace query
|
|
|
|
} // namespace clang
|
|
|
|
|
|
|
|
#endif
|