[clang] Driver: Accept the --gcc-install-dir option multiple times (PR #71446)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Nov 6 14:12:13 PST 2023
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff bc7a3bd864be696217c4d11eddf16bed7646b60f 2474aad8585829936af66d8b1238a1876c0f8327 -- clang/lib/Driver/ToolChains/Gnu.cpp clang/test/Driver/gcc-install-dir.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang/lib/Driver/ToolChains/Gnu.cpp b/clang/lib/Driver/ToolChains/Gnu.cpp
index 64645cd03b6f..ba5a3b4f6b5d 100644
--- a/clang/lib/Driver/ToolChains/Gnu.cpp
+++ b/clang/lib/Driver/ToolChains/Gnu.cpp
@@ -2127,7 +2127,8 @@ void Generic_GCC::GCCInstallationDetector::init(
// If --gcc-install-dir= is specified, skip filesystem detection.
std::vector<std::string> FailedGCCInstallDirs;
- std::vector<std::string> GCCInstallDirs = Args.getAllArgValues(clang::driver::options::OPT_gcc_install_dir_EQ);
+ std::vector<std::string> GCCInstallDirs =
+ Args.getAllArgValues(clang::driver::options::OPT_gcc_install_dir_EQ);
for (auto it = GCCInstallDirs.rbegin(); it != GCCInstallDirs.rend(); ++it) {
StringRef InstallDir = *it;
if (!ScanGCCForMultilibs(TargetTriple, Args, InstallDir, false)) {
@@ -2155,7 +2156,6 @@ void Generic_GCC::GCCInstallationDetector::init(
if (!FailedGCCInstallDirs.empty())
return;
-
// Compute the set of prefixes for our search.
SmallVector<std::string, 8> Prefixes;
StringRef GCCToolchainDir = getGCCToolchainDir(Args, D.SysRoot);
``````````
</details>
https://github.com/llvm/llvm-project/pull/71446
More information about the cfe-commits
mailing list