llvm/clang/include/clang/Frontend/FrontendActions.h

//===-- FrontendActions.h - Useful Frontend Actions -------------*- 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 LLVM_CLANG_FRONTEND_FRONTENDACTIONS_H
#define LLVM_CLANG_FRONTEND_FRONTENDACTIONS_H

#include "clang/Frontend/FrontendAction.h"
#include <memory>
#include <string>
#include <vector>

namespace clang {

//===----------------------------------------------------------------------===//
// Custom Consumer Actions
//===----------------------------------------------------------------------===//

class InitOnlyAction : public FrontendAction {};

/// Preprocessor-based frontend action that also loads PCH files.
class ReadPCHAndPreprocessAction : public FrontendAction {};

class DumpCompilerOptionsAction : public FrontendAction {};

//===----------------------------------------------------------------------===//
// AST Consumer Actions
//===----------------------------------------------------------------------===//

class ASTPrintAction : public ASTFrontendAction {};

class ASTDumpAction : public ASTFrontendAction {};

class ASTDeclListAction : public ASTFrontendAction {};

class ASTViewAction : public ASTFrontendAction {};

class GeneratePCHAction : public ASTFrontendAction {};

class GenerateModuleAction : public ASTFrontendAction {};

class GenerateInterfaceStubsAction : public ASTFrontendAction {};

class GenerateModuleFromModuleMapAction : public GenerateModuleAction {};

/// Generates full BMI (which contains full information to generate the object
/// files) for C++20 Named Modules.
class GenerateModuleInterfaceAction : public GenerateModuleAction {};

/// Only generates the reduced BMI. This action is mainly used by tests.
class GenerateReducedModuleInterfaceAction
    : public GenerateModuleInterfaceAction {};

class GenerateHeaderUnitAction : public GenerateModuleAction {};

class SyntaxOnlyAction : public ASTFrontendAction {};

/// Dump information about the given module file, to be used for
/// basic debugging and discovery.
class DumpModuleInfoAction : public ASTFrontendAction {};

class VerifyPCHAction : public ASTFrontendAction {};

class TemplightDumpAction : public ASTFrontendAction {};

/**
 * Frontend action adaptor that merges ASTs together.
 *
 * This action takes an existing AST file and "merges" it into the AST
 * context, producing a merged context. This action is an action
 * adaptor, which forwards most of its calls to another action that
 * will consume the merged context.
 */
class ASTMergeAction : public FrontendAction {};

class PrintPreambleAction : public FrontendAction {};

class PrintDependencyDirectivesSourceMinimizerAction : public FrontendAction {};

//===----------------------------------------------------------------------===//
// Preprocessor Actions
//===----------------------------------------------------------------------===//

class DumpRawTokensAction : public PreprocessorFrontendAction {};

class DumpTokensAction : public PreprocessorFrontendAction {};

class PreprocessOnlyAction : public PreprocessorFrontendAction {};

class PrintPreprocessedAction : public PreprocessorFrontendAction {};

class GetDependenciesByModuleNameAction : public PreprocessOnlyAction {};

}  // end namespace clang

#endif