[compiler-rt] bb4d974 - [NFC] Clang-format D129645

Vitaly Buka via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 14 10:28:09 PDT 2022


Author: Vitaly Buka
Date: 2022-07-14T10:27:04-07:00
New Revision: bb4d974135826c0652e660c295f462d1496975ff

URL: https://github.com/llvm/llvm-project/commit/bb4d974135826c0652e660c295f462d1496975ff
DIFF: https://github.com/llvm/llvm-project/commit/bb4d974135826c0652e660c295f462d1496975ff.diff

LOG: [NFC] Clang-format D129645

Added: 
    

Modified: 
    compiler-rt/lib/hwasan/hwasan_linux.cpp
    compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp

Removed: 
    


################################################################################
diff  --git a/compiler-rt/lib/hwasan/hwasan_linux.cpp b/compiler-rt/lib/hwasan/hwasan_linux.cpp
index dcab473d8ad19..2d7a44525c5ff 100644
--- a/compiler-rt/lib/hwasan/hwasan_linux.cpp
+++ b/compiler-rt/lib/hwasan/hwasan_linux.cpp
@@ -114,19 +114,20 @@ void InitializeOsSupport() {
 #  define PR_SET_TAGGED_ADDR_CTRL 55
 #  define PR_GET_TAGGED_ADDR_CTRL 56
 #  define PR_TAGGED_ADDR_ENABLE (1UL << 0)
-#  define ARCH_GET_UNTAG_MASK     0x4001
+#  define ARCH_GET_UNTAG_MASK 0x4001
 #  define ARCH_ENABLE_TAGGED_ADDR 0x4002
   // Check we're running on a kernel that can use the tagged address ABI.
   int local_errno = 0;
   bool has_abi;
 #  if defined(__x86_64__)
   has_abi = (internal_iserror(internal_arch_prctl(ARCH_GET_UNTAG_MASK, 0),
-                       &local_errno) &&
-      local_errno == EINVAL);
+                              &local_errno) &&
+             local_errno == EINVAL);
 #  else
-  has_abi = (internal_iserror(internal_prctl(PR_GET_TAGGED_ADDR_CTRL, 0, 0, 0, 0),
-                       &local_errno) &&
-      local_errno == EINVAL);
+  has_abi =
+      (internal_iserror(internal_prctl(PR_GET_TAGGED_ADDR_CTRL, 0, 0, 0, 0),
+                        &local_errno) &&
+       local_errno == EINVAL);
 #  endif
   if (has_abi) {
 #  if SANITIZER_ANDROID || defined(HWASAN_ALIASING_MODE)

diff  --git a/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp b/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp
index be37fd7f68b31..9bddd7d784643 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp
@@ -763,14 +763,14 @@ uptr internal_lseek(fd_t fd, OFF_T offset, int whence) {
 uptr internal_prctl(int option, uptr arg2, uptr arg3, uptr arg4, uptr arg5) {
   return internal_syscall(SYSCALL(prctl), option, arg2, arg3, arg4, arg5);
 }
-# if defined(__x86_64__)
-#include <asm/unistd_64.h>
+#      if defined(__x86_64__)
+#        include <asm/unistd_64.h>
 // Currently internal_arch_prctl() is only needed on x86_64.
 uptr internal_arch_prctl(int option, uptr arg2) {
   return internal_syscall(__NR_arch_prctl, option, arg2);
 }
-# endif
-#endif
+#      endif
+#    endif
 
 uptr internal_sigaltstack(const void *ss, void *oss) {
   return internal_syscall(SYSCALL(sigaltstack), (uptr)ss, (uptr)oss);


        


More information about the llvm-commits mailing list