[clang] 7415799 - [Driver][NFC] Make some derived classes of Tool final (#70416)

via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 27 12:53:18 PDT 2023


Author: Brad Smith
Date: 2023-10-27T15:53:14-04:00
New Revision: 741579930e9b49cee9d859a7468f5e9d0c6f2006

URL: https://github.com/llvm/llvm-project/commit/741579930e9b49cee9d859a7468f5e9d0c6f2006
DIFF: https://github.com/llvm/llvm-project/commit/741579930e9b49cee9d859a7468f5e9d0c6f2006.diff

LOG: [Driver][NFC] Make some derived classes of Tool final (#70416)

Added: 
    

Modified: 
    clang/lib/Driver/ToolChains/AIX.h
    clang/lib/Driver/ToolChains/AMDGPU.h
    clang/lib/Driver/ToolChains/AVR.h
    clang/lib/Driver/ToolChains/BareMetal.h
    clang/lib/Driver/ToolChains/CSKYToolChain.h
    clang/lib/Driver/ToolChains/CrossWindows.h
    clang/lib/Driver/ToolChains/Cuda.h
    clang/lib/Driver/ToolChains/DragonFly.h
    clang/lib/Driver/ToolChains/FreeBSD.h
    clang/lib/Driver/ToolChains/Fuchsia.h
    clang/lib/Driver/ToolChains/HIPAMD.h
    clang/lib/Driver/ToolChains/HIPSPV.h
    clang/lib/Driver/ToolChains/Hexagon.h
    clang/lib/Driver/ToolChains/MSP430.h
    clang/lib/Driver/ToolChains/MSVC.h
    clang/lib/Driver/ToolChains/MinGW.h
    clang/lib/Driver/ToolChains/NaCl.h
    clang/lib/Driver/ToolChains/NetBSD.h
    clang/lib/Driver/ToolChains/OpenBSD.h
    clang/lib/Driver/ToolChains/PS4CPU.h
    clang/lib/Driver/ToolChains/RISCVToolchain.h
    clang/lib/Driver/ToolChains/SPIRV.h
    clang/lib/Driver/ToolChains/Solaris.h
    clang/lib/Driver/ToolChains/WebAssembly.h
    clang/lib/Driver/ToolChains/XCore.h
    clang/lib/Driver/ToolChains/ZOS.h

Removed: 
    


################################################################################
diff  --git a/clang/lib/Driver/ToolChains/AIX.h b/clang/lib/Driver/ToolChains/AIX.h
index 04f9b2240999cc2..755d87e07ec5003 100644
--- a/clang/lib/Driver/ToolChains/AIX.h
+++ b/clang/lib/Driver/ToolChains/AIX.h
@@ -19,7 +19,7 @@ namespace tools {
 /// Directly call system default assembler and linker.
 namespace aix {
 
-class LLVM_LIBRARY_VISIBILITY Assembler : public Tool {
+class LLVM_LIBRARY_VISIBILITY Assembler final : public Tool {
 public:
   Assembler(const ToolChain &TC) : Tool("aix::Assembler", "assembler", TC) {}
 
@@ -31,7 +31,7 @@ class LLVM_LIBRARY_VISIBILITY Assembler : public Tool {
                     const char *LinkingOutput) const override;
 };
 
-class LLVM_LIBRARY_VISIBILITY Linker : public Tool {
+class LLVM_LIBRARY_VISIBILITY Linker final : public Tool {
 public:
   Linker(const ToolChain &TC) : Tool("aix::Linker", "linker", TC) {}
 

diff  --git a/clang/lib/Driver/ToolChains/AMDGPU.h b/clang/lib/Driver/ToolChains/AMDGPU.h
index d10d487dd44c582..b3361b1e3607964 100644
--- a/clang/lib/Driver/ToolChains/AMDGPU.h
+++ b/clang/lib/Driver/ToolChains/AMDGPU.h
@@ -26,7 +26,7 @@ namespace driver {
 namespace tools {
 namespace amdgpu {
 
-class LLVM_LIBRARY_VISIBILITY Linker : public Tool {
+class LLVM_LIBRARY_VISIBILITY Linker final : public Tool {
 public:
   Linker(const ToolChain &TC) : Tool("amdgpu::Linker", "ld.lld", TC) {}
   bool isLinkJob() const override { return true; }

diff  --git a/clang/lib/Driver/ToolChains/AVR.h b/clang/lib/Driver/ToolChains/AVR.h
index d432d81744b9281..247188b7eaad749 100644
--- a/clang/lib/Driver/ToolChains/AVR.h
+++ b/clang/lib/Driver/ToolChains/AVR.h
@@ -49,7 +49,7 @@ class LLVM_LIBRARY_VISIBILITY AVRToolChain : public Generic_ELF {
 
 namespace tools {
 namespace AVR {
-class LLVM_LIBRARY_VISIBILITY Linker : public Tool {
+class LLVM_LIBRARY_VISIBILITY Linker final : public Tool {
 public:
   Linker(const llvm::Triple &Triple, const ToolChain &TC)
       : Tool("AVR::Linker", "avr-ld", TC), Triple(Triple) {}

diff  --git a/clang/lib/Driver/ToolChains/BareMetal.h b/clang/lib/Driver/ToolChains/BareMetal.h
index fc39a2a10e01990..f602ef2be3542fb 100644
--- a/clang/lib/Driver/ToolChains/BareMetal.h
+++ b/clang/lib/Driver/ToolChains/BareMetal.h
@@ -98,7 +98,7 @@ class LLVM_LIBRARY_VISIBILITY StaticLibTool : public Tool {
                     const char *LinkingOutput) const override;
 };
 
-class LLVM_LIBRARY_VISIBILITY Linker : public Tool {
+class LLVM_LIBRARY_VISIBILITY Linker final : public Tool {
 public:
   Linker(const ToolChain &TC) : Tool("baremetal::Linker", "ld.lld", TC) {}
   bool isLinkJob() const override { return true; }

diff  --git a/clang/lib/Driver/ToolChains/CSKYToolChain.h b/clang/lib/Driver/ToolChains/CSKYToolChain.h
index 52b37539cc5f1a9..a57324a426416d9 100644
--- a/clang/lib/Driver/ToolChains/CSKYToolChain.h
+++ b/clang/lib/Driver/ToolChains/CSKYToolChain.h
@@ -44,7 +44,7 @@ class LLVM_LIBRARY_VISIBILITY CSKYToolChain : public Generic_ELF {
 
 namespace tools {
 namespace CSKY {
-class LLVM_LIBRARY_VISIBILITY Linker : public Tool {
+class LLVM_LIBRARY_VISIBILITY Linker final : public Tool {
 public:
   Linker(const ToolChain &TC) : Tool("CSKY::Linker", "ld", TC) {}
   bool hasIntegratedCPP() const override { return false; }

diff  --git a/clang/lib/Driver/ToolChains/CrossWindows.h b/clang/lib/Driver/ToolChains/CrossWindows.h
index 0ba17bc3e305cd7..c5df55a24296fa7 100644
--- a/clang/lib/Driver/ToolChains/CrossWindows.h
+++ b/clang/lib/Driver/ToolChains/CrossWindows.h
@@ -20,7 +20,7 @@ namespace driver {
 namespace tools {
 
 namespace CrossWindows {
-class LLVM_LIBRARY_VISIBILITY Assembler : public Tool {
+class LLVM_LIBRARY_VISIBILITY Assembler final : public Tool {
 public:
   Assembler(const ToolChain &TC) : Tool("CrossWindows::Assembler", "as", TC) {}
 
@@ -32,7 +32,7 @@ class LLVM_LIBRARY_VISIBILITY Assembler : public Tool {
                     const char *LinkingOutput) const override;
 };
 
-class LLVM_LIBRARY_VISIBILITY Linker : public Tool {
+class LLVM_LIBRARY_VISIBILITY Linker final : public Tool {
 public:
   Linker(const ToolChain &TC) : Tool("CrossWindows::Linker", "ld", TC) {}
 

diff  --git a/clang/lib/Driver/ToolChains/Cuda.h b/clang/lib/Driver/ToolChains/Cuda.h
index f7c0c7ea1c98c8d..8a053f3393e1206 100644
--- a/clang/lib/Driver/ToolChains/Cuda.h
+++ b/clang/lib/Driver/ToolChains/Cuda.h
@@ -81,7 +81,7 @@ namespace tools {
 namespace NVPTX {
 
 // Run ptxas, the NVPTX assembler.
-class LLVM_LIBRARY_VISIBILITY Assembler : public Tool {
+class LLVM_LIBRARY_VISIBILITY Assembler final : public Tool {
 public:
   Assembler(const ToolChain &TC) : Tool("NVPTX::Assembler", "ptxas", TC) {}
 
@@ -108,7 +108,7 @@ class LLVM_LIBRARY_VISIBILITY FatBinary : public Tool {
 };
 
 // Runs nvlink, which links GPU object files ("cubin" files) into a single file.
-class LLVM_LIBRARY_VISIBILITY Linker : public Tool {
+class LLVM_LIBRARY_VISIBILITY Linker final : public Tool {
 public:
   Linker(const ToolChain &TC) : Tool("NVPTX::Linker", "nvlink", TC) {}
 

diff  --git a/clang/lib/Driver/ToolChains/DragonFly.h b/clang/lib/Driver/ToolChains/DragonFly.h
index 4dceb09a17364df..715f6b45519bae5 100644
--- a/clang/lib/Driver/ToolChains/DragonFly.h
+++ b/clang/lib/Driver/ToolChains/DragonFly.h
@@ -19,7 +19,7 @@ namespace tools {
 
 /// Directly call GNU Binutils assembler and linker
 namespace dragonfly {
-class LLVM_LIBRARY_VISIBILITY Assembler : public Tool {
+class LLVM_LIBRARY_VISIBILITY Assembler final : public Tool {
 public:
   Assembler(const ToolChain &TC)
       : Tool("dragonfly::Assembler", "assembler", TC) {}
@@ -32,7 +32,7 @@ class LLVM_LIBRARY_VISIBILITY Assembler : public Tool {
                     const char *LinkingOutput) const override;
 };
 
-class LLVM_LIBRARY_VISIBILITY Linker : public Tool {
+class LLVM_LIBRARY_VISIBILITY Linker final : public Tool {
 public:
   Linker(const ToolChain &TC) : Tool("dragonfly::Linker", "linker", TC) {}
 

diff  --git a/clang/lib/Driver/ToolChains/FreeBSD.h b/clang/lib/Driver/ToolChains/FreeBSD.h
index 740274b314ba1f8..959cbf78ddc79d1 100644
--- a/clang/lib/Driver/ToolChains/FreeBSD.h
+++ b/clang/lib/Driver/ToolChains/FreeBSD.h
@@ -19,7 +19,7 @@ namespace tools {
 
 /// Directly call GNU Binutils assembler and linker
 namespace freebsd {
-class LLVM_LIBRARY_VISIBILITY Assembler : public Tool {
+class LLVM_LIBRARY_VISIBILITY Assembler final : public Tool {
 public:
   Assembler(const ToolChain &TC)
       : Tool("freebsd::Assembler", "assembler", TC) {}
@@ -32,7 +32,7 @@ class LLVM_LIBRARY_VISIBILITY Assembler : public Tool {
                     const char *LinkingOutput) const override;
 };
 
-class LLVM_LIBRARY_VISIBILITY Linker : public Tool {
+class LLVM_LIBRARY_VISIBILITY Linker final : public Tool {
 public:
   Linker(const ToolChain &TC) : Tool("freebsd::Linker", "linker", TC) {}
 

diff  --git a/clang/lib/Driver/ToolChains/Fuchsia.h b/clang/lib/Driver/ToolChains/Fuchsia.h
index 95e1785c9fac979..619968f5850240b 100644
--- a/clang/lib/Driver/ToolChains/Fuchsia.h
+++ b/clang/lib/Driver/ToolChains/Fuchsia.h
@@ -32,7 +32,7 @@ class LLVM_LIBRARY_VISIBILITY StaticLibTool : public Tool {
                     const char *LinkingOutput) const override;
 };
 
-class LLVM_LIBRARY_VISIBILITY Linker : public Tool {
+class LLVM_LIBRARY_VISIBILITY Linker final : public Tool {
 public:
   Linker(const ToolChain &TC) : Tool("fuchsia::Linker", "ld.lld", TC) {}
 

diff  --git a/clang/lib/Driver/ToolChains/HIPAMD.h b/clang/lib/Driver/ToolChains/HIPAMD.h
index 7275b1a137ac8d5..d81a9733014ccbe 100644
--- a/clang/lib/Driver/ToolChains/HIPAMD.h
+++ b/clang/lib/Driver/ToolChains/HIPAMD.h
@@ -21,7 +21,7 @@ namespace tools {
 namespace AMDGCN {
 // Runs llvm-link/opt/llc/lld, which links multiple LLVM bitcode, together with
 // device library, then compiles it to ISA in a shared object.
-class LLVM_LIBRARY_VISIBILITY Linker : public Tool {
+class LLVM_LIBRARY_VISIBILITY Linker final : public Tool {
 public:
   Linker(const ToolChain &TC) : Tool("AMDGCN::Linker", "amdgcn-link", TC) {}
 

diff  --git a/clang/lib/Driver/ToolChains/HIPSPV.h b/clang/lib/Driver/ToolChains/HIPSPV.h
index 1eaef432171ece8..ecd82e7052e48aa 100644
--- a/clang/lib/Driver/ToolChains/HIPSPV.h
+++ b/clang/lib/Driver/ToolChains/HIPSPV.h
@@ -20,7 +20,7 @@ namespace HIPSPV {
 
 // Runs llvm-link/opt/llc/lld, which links multiple LLVM bitcode, together with
 // device library, then compiles it to SPIR-V in a shared object.
-class LLVM_LIBRARY_VISIBILITY Linker : public Tool {
+class LLVM_LIBRARY_VISIBILITY Linker final : public Tool {
 public:
   Linker(const ToolChain &TC) : Tool("HIPSPV::Linker", "hipspv-link", TC) {}
 

diff  --git a/clang/lib/Driver/ToolChains/Hexagon.h b/clang/lib/Driver/ToolChains/Hexagon.h
index 4799c3028ff9a98..e35a224dced4152 100644
--- a/clang/lib/Driver/ToolChains/Hexagon.h
+++ b/clang/lib/Driver/ToolChains/Hexagon.h
@@ -20,7 +20,7 @@ namespace hexagon {
 // For Hexagon, we do not need to instantiate tools for PreProcess, PreCompile
 // and Compile.
 // We simply use "clang -cc1" for those actions.
-class LLVM_LIBRARY_VISIBILITY Assembler : public Tool {
+class LLVM_LIBRARY_VISIBILITY Assembler final : public Tool {
 public:
   Assembler(const ToolChain &TC)
       : Tool("hexagon::Assembler", "hexagon-as", TC) {}
@@ -35,7 +35,7 @@ class LLVM_LIBRARY_VISIBILITY Assembler : public Tool {
                     const char *LinkingOutput) const override;
 };
 
-class LLVM_LIBRARY_VISIBILITY Linker : public Tool {
+class LLVM_LIBRARY_VISIBILITY Linker final : public Tool {
 public:
   Linker(const ToolChain &TC) : Tool("hexagon::Linker", "hexagon-ld", TC) {}
 

diff  --git a/clang/lib/Driver/ToolChains/MSP430.h b/clang/lib/Driver/ToolChains/MSP430.h
index 2e838c027e0f8ba..a224c6375411807 100644
--- a/clang/lib/Driver/ToolChains/MSP430.h
+++ b/clang/lib/Driver/ToolChains/MSP430.h
@@ -59,7 +59,7 @@ class LLVM_LIBRARY_VISIBILITY MSP430ToolChain : public Generic_ELF {
 namespace tools {
 namespace msp430 {
 
-class LLVM_LIBRARY_VISIBILITY Linker : public Tool {
+class LLVM_LIBRARY_VISIBILITY Linker final : public Tool {
 public:
   Linker(const ToolChain &TC) : Tool("MSP430::Linker", "msp430-elf-ld", TC) {}
   bool hasIntegratedCPP() const override { return false; }

diff  --git a/clang/lib/Driver/ToolChains/MSVC.h b/clang/lib/Driver/ToolChains/MSVC.h
index 0f687bc70ae4775..fb27c621f2d1fe8 100644
--- a/clang/lib/Driver/ToolChains/MSVC.h
+++ b/clang/lib/Driver/ToolChains/MSVC.h
@@ -23,7 +23,7 @@ namespace tools {
 
 /// Visual studio tools.
 namespace visualstudio {
-class LLVM_LIBRARY_VISIBILITY Linker : public Tool {
+class LLVM_LIBRARY_VISIBILITY Linker final : public Tool {
 public:
   Linker(const ToolChain &TC) : Tool("visualstudio::Linker", "linker", TC) {}
 

diff  --git a/clang/lib/Driver/ToolChains/MinGW.h b/clang/lib/Driver/ToolChains/MinGW.h
index a71013912d0a3e9..75d629d5d1cb3bf 100644
--- a/clang/lib/Driver/ToolChains/MinGW.h
+++ b/clang/lib/Driver/ToolChains/MinGW.h
@@ -34,7 +34,7 @@ class LLVM_LIBRARY_VISIBILITY Assembler : public Tool {
                     const char *LinkingOutput) const override;
 };
 
-class LLVM_LIBRARY_VISIBILITY Linker : public Tool {
+class LLVM_LIBRARY_VISIBILITY Linker final : public Tool {
 public:
   Linker(const ToolChain &TC) : Tool("MinGW::Linker", "linker", TC) {}
 

diff  --git a/clang/lib/Driver/ToolChains/NaCl.h b/clang/lib/Driver/ToolChains/NaCl.h
index 5e5fdb583bb6008..01d4719e7b929a0 100644
--- a/clang/lib/Driver/ToolChains/NaCl.h
+++ b/clang/lib/Driver/ToolChains/NaCl.h
@@ -27,7 +27,7 @@ class LLVM_LIBRARY_VISIBILITY AssemblerARM : public gnutools::Assembler {
                     const char *LinkingOutput) const override;
 };
 
-class LLVM_LIBRARY_VISIBILITY Linker : public Tool {
+class LLVM_LIBRARY_VISIBILITY Linker final : public Tool {
 public:
   Linker(const ToolChain &TC) : Tool("NaCl::Linker", "linker", TC) {}
 

diff  --git a/clang/lib/Driver/ToolChains/NetBSD.h b/clang/lib/Driver/ToolChains/NetBSD.h
index 044c4239c3f48a2..96303acaa00994f 100644
--- a/clang/lib/Driver/ToolChains/NetBSD.h
+++ b/clang/lib/Driver/ToolChains/NetBSD.h
@@ -19,7 +19,7 @@ namespace tools {
 
 /// Directly call GNU Binutils assembler and linker
 namespace netbsd {
-class LLVM_LIBRARY_VISIBILITY Assembler : public Tool {
+class LLVM_LIBRARY_VISIBILITY Assembler final : public Tool {
 public:
   Assembler(const ToolChain &TC) : Tool("netbsd::Assembler", "assembler", TC) {}
 
@@ -31,7 +31,7 @@ class LLVM_LIBRARY_VISIBILITY Assembler : public Tool {
                     const char *LinkingOutput) const override;
 };
 
-class LLVM_LIBRARY_VISIBILITY Linker : public Tool {
+class LLVM_LIBRARY_VISIBILITY Linker final : public Tool {
 public:
   Linker(const ToolChain &TC) : Tool("netbsd::Linker", "linker", TC) {}
 

diff  --git a/clang/lib/Driver/ToolChains/OpenBSD.h b/clang/lib/Driver/ToolChains/OpenBSD.h
index 486dbf1407c2412..b4350e72d5d2609 100644
--- a/clang/lib/Driver/ToolChains/OpenBSD.h
+++ b/clang/lib/Driver/ToolChains/OpenBSD.h
@@ -20,7 +20,7 @@ namespace tools {
 
 /// Directly call GNU Binutils assembler and linker
 namespace openbsd {
-class LLVM_LIBRARY_VISIBILITY Assembler : public Tool {
+class LLVM_LIBRARY_VISIBILITY Assembler final : public Tool {
 public:
   Assembler(const ToolChain &TC)
       : Tool("openbsd::Assembler", "assembler", TC) {}
@@ -33,7 +33,7 @@ class LLVM_LIBRARY_VISIBILITY Assembler : public Tool {
                     const char *LinkingOutput) const override;
 };
 
-class LLVM_LIBRARY_VISIBILITY Linker : public Tool {
+class LLVM_LIBRARY_VISIBILITY Linker final : public Tool {
 public:
   Linker(const ToolChain &TC) : Tool("openbsd::Linker", "linker", TC) {}
 

diff  --git a/clang/lib/Driver/ToolChains/PS4CPU.h b/clang/lib/Driver/ToolChains/PS4CPU.h
index a51351d367be848..fee80e77462f39d 100644
--- a/clang/lib/Driver/ToolChains/PS4CPU.h
+++ b/clang/lib/Driver/ToolChains/PS4CPU.h
@@ -27,7 +27,7 @@ void addProfileRTArgs(const ToolChain &TC, const llvm::opt::ArgList &Args,
 void addSanitizerArgs(const ToolChain &TC, const llvm::opt::ArgList &Args,
                       llvm::opt::ArgStringList &CmdArgs);
 
-class LLVM_LIBRARY_VISIBILITY Assembler : public Tool {
+class LLVM_LIBRARY_VISIBILITY Assembler final : public Tool {
 public:
   Assembler(const ToolChain &TC) : Tool("PScpu::Assembler", "assembler", TC) {}
 
@@ -39,7 +39,7 @@ class LLVM_LIBRARY_VISIBILITY Assembler : public Tool {
                     const char *LinkingOutput) const override;
 };
 
-class LLVM_LIBRARY_VISIBILITY Linker : public Tool {
+class LLVM_LIBRARY_VISIBILITY Linker final : public Tool {
 public:
   Linker(const ToolChain &TC) : Tool("PScpu::Linker", "linker", TC) {}
 

diff  --git a/clang/lib/Driver/ToolChains/RISCVToolchain.h b/clang/lib/Driver/ToolChains/RISCVToolchain.h
index de6960726f1cd77..cec817ef7190be5 100644
--- a/clang/lib/Driver/ToolChains/RISCVToolchain.h
+++ b/clang/lib/Driver/ToolChains/RISCVToolchain.h
@@ -46,7 +46,7 @@ class LLVM_LIBRARY_VISIBILITY RISCVToolChain : public Generic_ELF {
 
 namespace tools {
 namespace RISCV {
-class LLVM_LIBRARY_VISIBILITY Linker : public Tool {
+class LLVM_LIBRARY_VISIBILITY Linker final : public Tool {
 public:
   Linker(const ToolChain &TC) : Tool("RISCV::Linker", "ld", TC) {}
   bool hasIntegratedCPP() const override { return false; }

diff  --git a/clang/lib/Driver/ToolChains/SPIRV.h b/clang/lib/Driver/ToolChains/SPIRV.h
index 3cd613d9aac295c..d4247ee0557f4b7 100644
--- a/clang/lib/Driver/ToolChains/SPIRV.h
+++ b/clang/lib/Driver/ToolChains/SPIRV.h
@@ -36,7 +36,7 @@ class LLVM_LIBRARY_VISIBILITY Translator : public Tool {
                     const char *LinkingOutput) const override;
 };
 
-class LLVM_LIBRARY_VISIBILITY Linker : public Tool {
+class LLVM_LIBRARY_VISIBILITY Linker final : public Tool {
 public:
   Linker(const ToolChain &TC) : Tool("SPIRV::Linker", "spirv-link", TC) {}
   bool hasIntegratedCPP() const override { return false; }

diff  --git a/clang/lib/Driver/ToolChains/Solaris.h b/clang/lib/Driver/ToolChains/Solaris.h
index b8f2497d7c8eb1b..9ec83b773da448d 100644
--- a/clang/lib/Driver/ToolChains/Solaris.h
+++ b/clang/lib/Driver/ToolChains/Solaris.h
@@ -19,7 +19,7 @@ namespace tools {
 
 /// Directly call Solaris assembler and linker
 namespace solaris {
-class LLVM_LIBRARY_VISIBILITY Assembler : public gnutools::Assembler {
+class LLVM_LIBRARY_VISIBILITY Assembler final : public gnutools::Assembler {
 public:
   Assembler(const ToolChain &TC) : gnutools::Assembler(TC) {}
 
@@ -33,7 +33,7 @@ class LLVM_LIBRARY_VISIBILITY Assembler : public gnutools::Assembler {
 
 bool isLinkerGnuLd(const ToolChain &TC, const llvm::opt::ArgList &Args);
 
-class LLVM_LIBRARY_VISIBILITY Linker : public Tool {
+class LLVM_LIBRARY_VISIBILITY Linker final : public Tool {
 public:
   Linker(const ToolChain &TC) : Tool("solaris::Linker", "linker", TC) {}
 

diff  --git a/clang/lib/Driver/ToolChains/WebAssembly.h b/clang/lib/Driver/ToolChains/WebAssembly.h
index 39589ffc1e3b69c..ae60f464c108185 100644
--- a/clang/lib/Driver/ToolChains/WebAssembly.h
+++ b/clang/lib/Driver/ToolChains/WebAssembly.h
@@ -18,7 +18,7 @@ namespace driver {
 namespace tools {
 namespace wasm {
 
-class LLVM_LIBRARY_VISIBILITY Linker : public Tool {
+class LLVM_LIBRARY_VISIBILITY Linker final : public Tool {
 public:
   explicit Linker(const ToolChain &TC) : Tool("wasm::Linker", "linker", TC) {}
   bool isLinkJob() const override { return true; }

diff  --git a/clang/lib/Driver/ToolChains/XCore.h b/clang/lib/Driver/ToolChains/XCore.h
index f2e66350243e582..95359a6e2542fde 100644
--- a/clang/lib/Driver/ToolChains/XCore.h
+++ b/clang/lib/Driver/ToolChains/XCore.h
@@ -20,7 +20,7 @@ namespace XCore {
 // For XCore, we do not need to instantiate tools for PreProcess, PreCompile and
 // Compile.
 // We simply use "clang -cc1" for those actions.
-class LLVM_LIBRARY_VISIBILITY Assembler : public Tool {
+class LLVM_LIBRARY_VISIBILITY Assembler final : public Tool {
 public:
   Assembler(const ToolChain &TC) : Tool("XCore::Assembler", "XCore-as", TC) {}
 
@@ -31,7 +31,7 @@ class LLVM_LIBRARY_VISIBILITY Assembler : public Tool {
                     const char *LinkingOutput) const override;
 };
 
-class LLVM_LIBRARY_VISIBILITY Linker : public Tool {
+class LLVM_LIBRARY_VISIBILITY Linker final : public Tool {
 public:
   Linker(const ToolChain &TC) : Tool("XCore::Linker", "XCore-ld", TC) {}
 

diff  --git a/clang/lib/Driver/ToolChains/ZOS.h b/clang/lib/Driver/ToolChains/ZOS.h
index 4b9b332c0f3fbda..45204ba0a543c1b 100644
--- a/clang/lib/Driver/ToolChains/ZOS.h
+++ b/clang/lib/Driver/ToolChains/ZOS.h
@@ -19,7 +19,7 @@ namespace tools {
 /// Directly call system default assembler and linker.
 namespace zos {
 
-class LLVM_LIBRARY_VISIBILITY Assembler : public Tool {
+class LLVM_LIBRARY_VISIBILITY Assembler final : public Tool {
 public:
   Assembler(const ToolChain &TC) : Tool("zos::Assembler", "assembler", TC) {}
 
@@ -31,7 +31,7 @@ class LLVM_LIBRARY_VISIBILITY Assembler : public Tool {
                     const char *LinkingOutput) const override;
 };
 
-class LLVM_LIBRARY_VISIBILITY Linker : public Tool {
+class LLVM_LIBRARY_VISIBILITY Linker final : public Tool {
 public:
   Linker(const ToolChain &TC) : Tool("zos::Linker", "linker", TC) {}
 


        


More information about the cfe-commits mailing list