llvm/lldb/source/Plugins/ExpressionParser/Clang/ASTStructExtractor.h

//===-- ASTStructExtractor.h ------------------------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef LLDB_SOURCE_PLUGINS_EXPRESSIONPARSER_CLANG_ASTSTRUCTEXTRACTOR_H
#define LLDB_SOURCE_PLUGINS_EXPRESSIONPARSER_CLANG_ASTSTRUCTEXTRACTOR_H

#include "ClangExpressionVariable.h"
#include "ClangFunctionCaller.h"

#include "clang/Sema/SemaConsumer.h"

namespace lldb_private {

/// \class ASTStructExtractor ASTStructExtractor.h
/// "lldb/Expression/ASTStructExtractor.h" Extracts and describes the argument
/// structure for a wrapped function.
///
/// This pass integrates with ClangFunctionCaller, which calls functions with
/// custom sets of arguments.  To avoid having to implement the full calling
/// convention for the target's architecture, ClangFunctionCaller writes a
/// simple wrapper function that takes a pointer to an argument structure that
/// contains room for the address of the function to be called, the values of
/// all its arguments, and room for the function's return value.
///
/// The definition of this struct is itself in the body of the wrapper
/// function, so Clang does the structure layout itself.  ASTStructExtractor
/// reads through the AST for the wrapper function and finds the struct.
class ASTStructExtractor : public clang::SemaConsumer {};

} // namespace lldb_private

#endif // LLDB_SOURCE_PLUGINS_EXPRESSIONPARSER_CLANG_ASTSTRUCTEXTRACTOR_H