//===--- Clang.h - Clang Tool and ToolChain Implementations ====-*- 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_LIB_DRIVER_TOOLCHAINS_CLANG_H #define LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_CLANG_H #include "MSVC.h" #include "clang/Driver/Driver.h" #include "clang/Driver/Tool.h" #include "clang/Driver/Types.h" #include "llvm/Frontend/Debug/Options.h" #include "llvm/Option/Option.h" #include "llvm/Support/raw_ostream.h" #include "llvm/TargetParser/Triple.h" namespace clang { class ObjCRuntime; namespace driver { namespace tools { /// Clang compiler tool. class LLVM_LIBRARY_VISIBILITY Clang : public Tool { … }; /// Clang integrated assembler tool. class LLVM_LIBRARY_VISIBILITY ClangAs : public Tool { … }; /// Offload bundler tool. class LLVM_LIBRARY_VISIBILITY OffloadBundler final : public Tool { … }; /// Offload binary tool. class LLVM_LIBRARY_VISIBILITY OffloadPackager final : public Tool { … }; /// Linker wrapper tool. class LLVM_LIBRARY_VISIBILITY LinkerWrapper final : public Tool { … }; enum class DwarfFissionKind { … }; DwarfFissionKind getDebugFissionKind(const Driver &D, const llvm::opt::ArgList &Args, llvm::opt::Arg *&Arg); // Calculate the output path of the module file when compiling a module unit // with the `-fmodule-output` option or `-fmodule-output=` option specified. // The behavior is: // - If `-fmodule-output=` is specfied, then the module file is // writing to the value. // - Otherwise if the output object file of the module unit is specified, the // output path // of the module file should be the same with the output object file except // the corresponding suffix. This requires both `-o` and `-c` are specified. // - Otherwise, the output path of the module file will be the same with the // input with the corresponding suffix. llvm::SmallString<256> getCXX20NamedModuleOutputPath(const llvm::opt::ArgList &Args, const char *BaseInput); } // end namespace tools } // end namespace driver } // end namespace clang #endif // LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_CLANG_H