[compiler-rt] 277f86d - [ASan] Ran clang-format on asan_mapping.h.

Kirill Stoimenov via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 8 12:15:41 PST 2021


Author: Kirill Stoimenov
Date: 2021-12-08T20:15:32Z
New Revision: 277f86d6106999ddbe3f2eb146f736c7feaab943

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

LOG: [ASan] Ran clang-format on asan_mapping.h.

Reviewed By: kstoimenov

Differential Revision: https://reviews.llvm.org/D115371

Added: 
    

Modified: 
    compiler-rt/lib/asan/asan_mapping.h

Removed: 
    


################################################################################
diff  --git a/compiler-rt/lib/asan/asan_mapping.h b/compiler-rt/lib/asan/asan_mapping.h
index 71b47f09c56e1..0e2dbdc9ad5bb 100644
--- a/compiler-rt/lib/asan/asan_mapping.h
+++ b/compiler-rt/lib/asan/asan_mapping.h
@@ -214,9 +214,9 @@ static const u64 kConstShadowOffset = ASAN_SHADOW_OFFSET_CONST;
 #endif
 
 #if SANITIZER_ANDROID && defined(__arm__)
-# define ASAN_PREMAP_SHADOW 1
+#  define ASAN_PREMAP_SHADOW 1
 #else
-# define ASAN_PREMAP_SHADOW 0
+#  define ASAN_PREMAP_SHADOW 0
 #endif
 
 #define ASAN_SHADOW_GRANULARITY (1ULL << ASAN_SHADOW_SCALE)
@@ -224,9 +224,9 @@ static const u64 kConstShadowOffset = ASAN_SHADOW_OFFSET_CONST;
 #define DO_ASAN_MAPPING_PROFILE 0  // Set to 1 to profile the functions below.
 
 #if DO_ASAN_MAPPING_PROFILE
-# define PROFILE_ASAN_MAPPING() AsanMappingProfile[__LINE__]++;
+#  define PROFILE_ASAN_MAPPING() AsanMappingProfile[__LINE__]++;
 #else
-# define PROFILE_ASAN_MAPPING()
+#  define PROFILE_ASAN_MAPPING()
 #endif
 
 // If 1, all shadow boundaries are constants.
@@ -242,8 +242,8 @@ extern uptr AsanMappingProfile[];
 // with non-fixed mapping. As of r175253 (Feb 2013) the performance
 // 
diff erence between fixed and non-fixed mapping is below the noise level.
 static uptr kHighMemEnd = 0x7fffffffffffULL;
-static uptr kMidMemBeg =    0x3000000000ULL;
-static uptr kMidMemEnd =    0x4fffffffffULL;
+static uptr kMidMemBeg = 0x3000000000ULL;
+static uptr kMidMemEnd = 0x4fffffffffULL;
 #else
 extern uptr kHighMemEnd, kMidMemBeg, kMidMemEnd;  // Initialized in __asan_init.
 #endif
@@ -345,7 +345,7 @@ static inline uptr MemToShadowSize(uptr size) {
 static inline bool AddrIsInMem(uptr a) {
   PROFILE_ASAN_MAPPING();
   return AddrIsInLowMem(a) || AddrIsInMidMem(a) || AddrIsInHighMem(a) ||
-      (flags()->protect_shadow_gap == 0 && AddrIsInShadowGap(a));
+         (flags()->protect_shadow_gap == 0 && AddrIsInShadowGap(a));
 }
 
 static inline uptr MemToShadow(uptr p) {
@@ -367,7 +367,7 @@ static inline bool AddrIsAlignedByGranularity(uptr a) {
 static inline bool AddressIsPoisoned(uptr a) {
   PROFILE_ASAN_MAPPING();
   const uptr kAccessSize = 1;
-  u8 *shadow_address = (u8*)MEM_TO_SHADOW(a);
+  u8 *shadow_address = (u8 *)MEM_TO_SHADOW(a);
   s8 shadow_value = *shadow_address;
   if (shadow_value) {
     u8 last_accessed_byte =


        


More information about the llvm-commits mailing list