clang 22.0.0git
Utils.h
Go to the documentation of this file.
1//===--- Utils.h - Misc utilities for the front-end -------------*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8//
9// This header contains miscellaneous utilities for various front-end actions
10// which were split from Frontend to minimise Frontend's dependencies.
11//
12//===----------------------------------------------------------------------===//
13
14#ifndef LLVM_CLANG_FRONTENDTOOL_UTILS_H
15#define LLVM_CLANG_FRONTENDTOOL_UTILS_H
16
17#include <memory>
18
19namespace clang {
20
22class FrontendAction;
23
24/// Construct the FrontendAction of a compiler invocation based on the
25/// options specified for the compiler invocation.
26///
27/// \return - The created FrontendAction object
28std::unique_ptr<FrontendAction> CreateFrontendAction(CompilerInstance &CI);
29
30/// ExecuteCompilerInvocation - Execute the given actions described by the
31/// compiler invocation object in the given compiler instance.
32///
33/// \return - True on success.
35
36} // end namespace clang
37
38#endif
CompilerInstance - Helper class for managing a single instance of the Clang compiler.
Abstract base class for actions which can be performed by the frontend.
The JSON file list parser is used to communicate input to InstallAPI.
bool ExecuteCompilerInvocation(CompilerInstance *Clang)
ExecuteCompilerInvocation - Execute the given actions described by the compiler invocation object in ...
std::unique_ptr< FrontendAction > CreateFrontendAction(CompilerInstance &CI)
Construct the FrontendAction of a compiler invocation based on the options specified for the compiler...