[Transforms] Silence a warning in SROA.cpp (NFC)
[llvm-project.git] / clang / lib / Driver / ToolChains / UEFI.h
bloba126ac32db6c6ca21699bb0c18ae21f6698f0b5b
1 //===--- UEFI.h - UEFI 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_UEFI_H
10 #define LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_UEFI_H
12 #include "clang/Driver/Tool.h"
13 #include "clang/Driver/ToolChain.h"
15 namespace clang::driver {
16 namespace tools {
17 namespace uefi {
18 class LLVM_LIBRARY_VISIBILITY Linker : public Tool {
19 public:
20 Linker(const ToolChain &TC) : Tool("uefi::Linker", "lld-link", TC) {}
22 bool hasIntegratedCPP() const override { return false; }
23 bool isLinkJob() const override { return true; }
25 void ConstructJob(Compilation &C, const JobAction &JA,
26 const InputInfo &Output, const InputInfoList &Inputs,
27 const llvm::opt::ArgList &TCArgs,
28 const char *LinkingOutput) const override;
30 } // end namespace uefi
31 } // end namespace tools
33 namespace toolchains {
35 class LLVM_LIBRARY_VISIBILITY UEFI : public ToolChain {
36 public:
37 UEFI(const Driver &D, const llvm::Triple &Triple,
38 const llvm::opt::ArgList &Args);
40 protected:
41 Tool *buildLinker() const override;
43 public:
44 bool HasNativeLLVMSupport() const override { return true; }
45 UnwindTableLevel
46 getDefaultUnwindTableLevel(const llvm::opt::ArgList &Args) const override {
47 return UnwindTableLevel::Asynchronous;
49 bool isPICDefault() const override { return true; }
50 bool isPIEDefault(const llvm::opt::ArgList &Args) const override {
51 return false;
53 bool isPICDefaultForced() const override { return true; }
56 } // namespace toolchains
57 } // namespace clang::driver
59 #endif // LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_UEFI_H