[clang] [libcxx] [llvm] Triple::normalize: Use none as OS for XX-none-ABI (PR #89638)

via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 30 23:28:51 PDT 2024


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 e04df693bf5b38099ef1d7ab8e6ce6a1469597e2 7471e4f6032b7913f9d983a3488f0c6f7e33c9b8 -- clang/test/Driver/arm-triple.c clang/test/Driver/baremetal-sysroot.cpp clang/test/Driver/baremetal.cpp clang/test/Driver/print-multi-selection-flags.c clang/unittests/Interpreter/IncrementalCompilerBuilderTest.cpp llvm/lib/TargetParser/Triple.cpp llvm/unittests/TargetParser/TripleTest.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/llvm/lib/TargetParser/Triple.cpp b/llvm/lib/TargetParser/Triple.cpp
index b36aebc14c..4faf87c03b 100644
--- a/llvm/lib/TargetParser/Triple.cpp
+++ b/llvm/lib/TargetParser/Triple.cpp
@@ -1151,9 +1151,9 @@ std::string Triple::normalize(StringRef Str) {
     }
   }
 
-  // If "none" is in the middle component in a three-component triple, treat it as
-  // the OS (Components[2]) instead of the vendor (Components[1]).
-  // This is for some baremetal cases, such as "arm-none-elf".
+  // If "none" is in the middle component in a three-component triple, treat it
+  // as the OS (Components[2]) instead of the vendor (Components[1]). This is
+  // for some baremetal cases, such as "arm-none-elf".
   if (Found[0] && !Found[1] && !Found[2] && Found[3] &&
       Components[1].equals("none") && Components[2].empty())
     std::swap(Components[1], Components[2]);

``````````

</details>


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


More information about the llvm-commits mailing list