[docs] Fix build-docs.sh
[llvm-project.git] / clang / lib / Driver / ToolChains / Flang.h
blobc5ac147da768cbcdd0c73107a4ed35c8532661aa
1 //===--- Flang.h - Flang Tool and ToolChain Implementations ====-*- 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 //===----------------------------------------------------------------------===//
9 #ifndef LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_FLANG_H
10 #define LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_FLANG_H
12 #include "clang/Driver/Tool.h"
13 #include "clang/Driver/Action.h"
14 #include "clang/Driver/Compilation.h"
15 #include "clang/Driver/ToolChain.h"
16 #include "llvm/Option/ArgList.h"
17 #include "llvm/Support/Compiler.h"
19 namespace clang {
20 namespace driver {
22 namespace tools {
24 /// Flang compiler tool.
25 class LLVM_LIBRARY_VISIBILITY Flang : public Tool {
26 private:
27 /// Extract fortran dialect options from the driver arguments and add them to
28 /// the list of arguments for the generated command/job.
29 ///
30 /// \param [in] Args The list of input driver arguments
31 /// \param [out] CmdArgs The list of output command arguments
32 void AddFortranDialectOptions(const llvm::opt::ArgList &Args,
33 llvm::opt::ArgStringList &CmdArgs) const;
35 /// Extract preprocessing options from the driver arguments and add them to
36 /// the preprocessor command arguments.
37 ///
38 /// \param [in] Args The list of input driver arguments
39 /// \param [out] CmdArgs The list of output command arguments
40 void AddPreprocessingOptions(const llvm::opt::ArgList &Args,
41 llvm::opt::ArgStringList &CmdArgs) const;
43 /// Extract PIC options from the driver arguments and add them to
44 /// the command arguments.
45 ///
46 /// \param [in] Args The list of input driver arguments
47 /// \param [out] CmdArgs The list of output command arguments
48 void AddPicOptions(const llvm::opt::ArgList &Args,
49 llvm::opt::ArgStringList &CmdArgs) const;
51 /// Extract other compilation options from the driver arguments and add them
52 /// to the command arguments.
53 ///
54 /// \param [in] Args The list of input driver arguments
55 /// \param [out] CmdArgs The list of output command arguments
56 void AddOtherOptions(const llvm::opt::ArgList &Args,
57 llvm::opt::ArgStringList &CmdArgs) const;
59 public:
60 Flang(const ToolChain &TC);
61 ~Flang() override;
63 bool hasGoodDiagnostics() const override { return true; }
64 bool hasIntegratedAssembler() const override { return true; }
65 bool hasIntegratedCPP() const override { return true; }
66 bool canEmitIR() const override { return true; }
68 void ConstructJob(Compilation &C, const JobAction &JA,
69 const InputInfo &Output, const InputInfoList &Inputs,
70 const llvm::opt::ArgList &TCArgs,
71 const char *LinkingOutput) const override;
74 } // end namespace tools
76 } // end namespace driver
77 } // end namespace clang
79 #endif // LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_FLANG_H