llvm/clang/include/clang/ExtractAPI/FrontendActions.h

//===- ExtractAPI/FrontendActions.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
//
//===----------------------------------------------------------------------===//
///
/// \file
/// This file defines the ExtractAPIAction and WrappingExtractAPIAction frontend
/// actions.
///
//===----------------------------------------------------------------------===//

#ifndef LLVM_CLANG_EXTRACTAPI_FRONTEND_ACTIONS_H
#define LLVM_CLANG_EXTRACTAPI_FRONTEND_ACTIONS_H

#include "clang/ExtractAPI/ExtractAPIActionBase.h"
#include "clang/Frontend/FrontendAction.h"

namespace clang {

/// ExtractAPIAction sets up the output file and creates the ExtractAPIVisitor.
class ExtractAPIAction : public ASTFrontendAction,
                         private ExtractAPIActionBase {};

/// Wrap ExtractAPIAction on top of a pre-existing action
///
/// Used when the ExtractAPI action needs to be executed as a side effect of a
/// regular compilation job. Unlike ExtarctAPIAction, this is meant to be used
/// on regular source files ( .m , .c files) instead of header files
class WrappingExtractAPIAction : public WrapperFrontendAction,
                                 private ExtractAPIActionBase {};

} // namespace clang

#endif // LLVM_CLANG_EXTRACTAPI_FRONTEND_ACTIONS_H