[clang] [llvm][ARM] Restore the default to -mstrict-align on Apple firmwares (PR #115546)

via cfe-commits cfe-commits at lists.llvm.org
Fri Nov 8 13:51:40 PST 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 db6f476e8e29c42691a3c3ea97d7230af2be5df8 a54e1c1b7ff03fa0f29b0a64e290763d6b085df8 --extensions cpp,c -- clang/lib/Driver/ToolChains/Arch/ARM.cpp clang/test/Driver/arm-alignment.c
``````````

</details>

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

``````````diff
diff --git a/clang/lib/Driver/ToolChains/Arch/ARM.cpp b/clang/lib/Driver/ToolChains/Arch/ARM.cpp
index f7e9cbfe88..e6ee2317a1 100644
--- a/clang/lib/Driver/ToolChains/Arch/ARM.cpp
+++ b/clang/lib/Driver/ToolChains/Arch/ARM.cpp
@@ -908,7 +908,8 @@ fp16_fml_fallthrough:
       if (VersionNum < 6 ||
           Triple.getSubArch() == llvm::Triple::SubArchType::ARMSubArch_v6m)
         Features.push_back("+strict-align");
-    } else if (Triple.getVendor() == llvm::Triple::Apple && Triple.isOSBinFormatMachO()) {
+    } else if (Triple.getVendor() == llvm::Triple::Apple &&
+               Triple.isOSBinFormatMachO()) {
       // Firmwares on Apple platforms are strict-align by default.
       Features.push_back("+strict-align");
     } else if (VersionNum < 7 ||

``````````

</details>


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


More information about the cfe-commits mailing list