[compiler-rt] [compiler-rt] Hardcode uptr/sptr typedefs on Linux Arm (PR #108105)

via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 10 15:31:28 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 5537ae87b3a87b3abeb4e6983cecd9b103648243 637775d297364b2cdf0e67253d4d11b65b49f1cf --extensions h -- compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h
``````````

</details>

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

``````````diff
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h b/compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h
index bf15d6704b..9208b12552 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h
@@ -139,14 +139,14 @@
 namespace __sanitizer {
 
 #if defined(__UINTPTR_TYPE__)
-#if defined(__arm__) && defined(__linux__)
+#  if defined(__arm__) && defined(__linux__)
 // Linux Arm headers redefine __UINTPTR_TYPE__ and disagree with clang/gcc.
 typedef unsigned int uptr;
 typedef int sptr;
-#else
+#  else
 typedef __UINTPTR_TYPE__ uptr;
 typedef __INTPTR_TYPE__ sptr;
-#endif
+#  endif
 #elif defined(_WIN64)
 // 64-bit Windows uses LLP64 data model.
 typedef unsigned long long uptr;

``````````

</details>


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


More information about the llvm-commits mailing list