• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //===--- Utils.h - Misc utilities for the flang 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_FLANG_FRONTENDTOOL_UTILS_H
15 #define LLVM_FLANG_FRONTENDTOOL_UTILS_H
16 
17 namespace Fortran::frontend {
18 
19 class CompilerInstance;
20 class FrontendAction;
21 
22 /// Construct the FrontendAction of a compiler invocation based on the
23 /// options specified for the compiler invocation.
24 ///
25 /// \return - The created FrontendAction object
26 std::unique_ptr<FrontendAction> CreateFrontendAction(CompilerInstance &ci);
27 
28 /// ExecuteCompilerInvocation - Execute the given actions described by the
29 /// compiler invocation object in the given compiler instance.
30 ///
31 /// \return - True on success.
32 bool ExecuteCompilerInvocation(CompilerInstance *flang);
33 
34 } // end namespace Fortran::frontend
35 
36 #endif // LLVM_FLANG_FRONTENDTOOL_UTILS_H
37