From 0627140cd593e20b89b55e309c35c82ef618190e Mon Sep 17 00:00:00 2001 From: Simon Pilgrim Date: Tue, 17 Nov 2020 12:22:33 +0000 Subject: [PATCH] [clang][driver] Fix definition/declaration argument name mismatches. NFCI. AddCXXStdlibLibArgs args were using the names for the clang equivalent methods. Silences cppcheck warnings. --- clang/lib/Driver/ToolChains/AIX.cpp | 8 ++++---- clang/lib/Driver/ToolChains/CrossWindows.cpp | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/clang/lib/Driver/ToolChains/AIX.cpp b/clang/lib/Driver/ToolChains/AIX.cpp index 7b5d7da..36fe578f 100644 --- a/clang/lib/Driver/ToolChains/AIX.cpp +++ b/clang/lib/Driver/ToolChains/AIX.cpp @@ -216,11 +216,11 @@ void AIX::AddClangSystemIncludeArgs(const ArgList &DriverArgs, addSystemInclude(DriverArgs, CC1Args, UP.str()); } -void AIX::AddCXXStdlibLibArgs(const llvm::opt::ArgList &DriverArgs, - llvm::opt::ArgStringList &CC1Args) const { - switch (GetCXXStdlibType(DriverArgs)) { +void AIX::AddCXXStdlibLibArgs(const llvm::opt::ArgList &Args, + llvm::opt::ArgStringList &CmdArgs) const { + switch (GetCXXStdlibType(Args)) { case ToolChain::CST_Libcxx: - CC1Args.push_back("-lc++"); + CmdArgs.push_back("-lc++"); return; case ToolChain::CST_Libstdcxx: llvm::report_fatal_error("linking libstdc++ unimplemented on AIX"); diff --git a/clang/lib/Driver/ToolChains/CrossWindows.cpp b/clang/lib/Driver/ToolChains/CrossWindows.cpp index 28ad6c5..07abf4f 100644 --- a/clang/lib/Driver/ToolChains/CrossWindows.cpp +++ b/clang/lib/Driver/ToolChains/CrossWindows.cpp @@ -271,10 +271,10 @@ AddClangCXXStdlibIncludeArgs(const llvm::opt::ArgList &DriverArgs, } void CrossWindowsToolChain:: -AddCXXStdlibLibArgs(const llvm::opt::ArgList &DriverArgs, - llvm::opt::ArgStringList &CC1Args) const { - if (GetCXXStdlibType(DriverArgs) == ToolChain::CST_Libcxx) - CC1Args.push_back("-lc++"); +AddCXXStdlibLibArgs(const llvm::opt::ArgList &Args, + llvm::opt::ArgStringList &CmdArgs) const { + if (GetCXXStdlibType(Args) == ToolChain::CST_Libcxx) + CmdArgs.push_back("-lc++"); } clang::SanitizerMask CrossWindowsToolChain::getSupportedSanitizers() const { -- 2.7.4