[clang] [Driver] Add the --gcc-triple option (PR #73214)

via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 22 22:51:02 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 7f18f9a28c73490d09938af1fdb1908eb333a62c 72f6f3a611f237f71ce02cfb79620257a9e2d827 -- clang/test/Driver/gcc-prefix.cpp clang/lib/Driver/ToolChains/Gnu.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 44b92a879a..24c4d0c303 100644
--- a/clang/lib/Driver/ToolChains/Gnu.cpp
+++ b/clang/lib/Driver/ToolChains/Gnu.cpp
@@ -2132,7 +2132,8 @@ void Generic_GCC::GCCInstallationDetector::init(
 
   // If --gcc-triple is specified use this instead of trying to
   // auto-detect a triple.
-  if (const Arg *A = Args.getLastArg(clang::driver::options::OPT_gcc_triple_EQ)) {
+  if (const Arg *A =
+          Args.getLastArg(clang::driver::options::OPT_gcc_triple_EQ)) {
     StringRef GCCTriple = A->getValue();
     CandidateTripleAliases.clear();
     CandidateTripleAliases.push_back(GCCTriple);

``````````

</details>


https://github.com/llvm/llvm-project/pull/73214


More information about the cfe-commits mailing list