[clang] Recommit [RISCV] Implement multi-lib reuse rule for RISC-V bare-metal toolchain (#73765) (PR #75890)

via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 18 19:47:15 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 cdc03926696d674c6aa61b55d5b509d7118ed023 43ecdfdc5d96d1b53ccfc851e3dce8547b2f6fe9 -- clang/test/Driver/riscv-toolchain-gcc-multilib-reuse.c 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 7e70626faf..38361d6889 100644
--- a/clang/lib/Driver/ToolChains/Gnu.cpp
+++ b/clang/lib/Driver/ToolChains/Gnu.cpp
@@ -1806,16 +1806,16 @@ selectRISCVMultilib(const MultilibSet &RISCVMultilibSet, StringRef Arch,
       // Check the XLEN explicitly.
       if (MLConfigISAInfo->getXLen() == 32) {
         NewMultilib.flag("-m32");
-        NewMultilib.flag("-m64", /*Disallow*/true);
+        NewMultilib.flag("-m64", /*Disallow*/ true);
       } else {
-        NewMultilib.flag("-m32", /*Disallow*/true);
+        NewMultilib.flag("-m32", /*Disallow*/ true);
         NewMultilib.flag("-m64");
       }
 
       // Atomic extension must be explicitly checked, soft and hard atomic
       // operation never co-work correctly.
       if (!MLConfigISAInfo->hasExtension("a"))
-        NewMultilib.flag("-a", /*Disallow*/true);
+        NewMultilib.flag("-a", /*Disallow*/ true);
     }
 
     if (Skip)

``````````

</details>


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


More information about the cfe-commits mailing list