[compiler-rt] e41c5aa - [NFC][sanitizer] Add () into a few macros
Vitaly Buka via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 11 09:48:43 PDT 2022
Author: Vitaly Buka
Date: 2022-08-11T09:48:28-07:00
New Revision: e41c5aaebe2f06ef375eb88ffc15d22bc1cea5c6
URL: https://github.com/llvm/llvm-project/commit/e41c5aaebe2f06ef375eb88ffc15d22bc1cea5c6
DIFF: https://github.com/llvm/llvm-project/commit/e41c5aaebe2f06ef375eb88ffc15d22bc1cea5c6.diff
LOG: [NFC][sanitizer] Add () into a few macros
Added:
Modified:
compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h
Removed:
################################################################################
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h b/compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h
index 15738ff1e1bcb..7722858e4161a 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h
@@ -387,12 +387,13 @@ enum LinkerInitialized { LINKER_INITIALIZED = 0 };
#if !defined(_MSC_VER) || defined(__clang__)
#if SANITIZER_S390_31
-#define GET_CALLER_PC() \
- (__sanitizer::uptr) __builtin_extract_return_addr(__builtin_return_address(0))
+# define GET_CALLER_PC() \
+ ((__sanitizer::uptr)__builtin_extract_return_addr( \
+ __builtin_return_address(0)))
#else
-#define GET_CALLER_PC() (__sanitizer::uptr) __builtin_return_address(0)
+# define GET_CALLER_PC() ((__sanitizer::uptr)__builtin_return_address(0))
#endif
-#define GET_CURRENT_FRAME() (__sanitizer::uptr) __builtin_frame_address(0)
+# define GET_CURRENT_FRAME() ((__sanitizer::uptr)__builtin_frame_address(0))
inline void Trap() {
__builtin_trap();
}
@@ -401,13 +402,13 @@ extern "C" void* _ReturnAddress(void);
extern "C" void* _AddressOfReturnAddress(void);
# pragma intrinsic(_ReturnAddress)
# pragma intrinsic(_AddressOfReturnAddress)
-#define GET_CALLER_PC() (__sanitizer::uptr) _ReturnAddress()
+# define GET_CALLER_PC() ((__sanitizer::uptr)_ReturnAddress())
// CaptureStackBackTrace doesn't need to know BP on Windows.
-#define GET_CURRENT_FRAME() \
- (((__sanitizer::uptr)_AddressOfReturnAddress()) + sizeof(__sanitizer::uptr))
+# define GET_CURRENT_FRAME() \
+ (((__sanitizer::uptr)_AddressOfReturnAddress()) + sizeof(__sanitizer::uptr))
extern "C" void __ud2(void);
-# pragma intrinsic(__ud2)
+# pragma intrinsic(__ud2)
inline void Trap() {
__ud2();
}
More information about the llvm-commits
mailing list