[compiler-rt] 4248f32 - [NFC][sanitizer] Use __builtin_extract_return_addr on all platforms
Vitaly Buka via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 11 09:48:46 PDT 2022
Author: Vitaly Buka
Date: 2022-08-11T09:48:29-07:00
New Revision: 4248f32b9ebe87c7af8ee53911efd47c2652f488
URL: https://github.com/llvm/llvm-project/commit/4248f32b9ebe87c7af8ee53911efd47c2652f488
DIFF: https://github.com/llvm/llvm-project/commit/4248f32b9ebe87c7af8ee53911efd47c2652f488.diff
LOG: [NFC][sanitizer] Use __builtin_extract_return_addr on all platforms
On most platforms it does nothing, so this eliminates a need for one #if.
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 7722858e4161..6b800820ab80 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h
@@ -386,13 +386,9 @@ void NORETURN CheckFailed(const char *file, int line, const char *cond,
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)))
-#else
-# define GET_CALLER_PC() ((__sanitizer::uptr)__builtin_return_address(0))
-#endif
+# define GET_CALLER_PC() \
+ ((__sanitizer::uptr)__builtin_extract_return_addr( \
+ __builtin_return_address(0)))
# define GET_CURRENT_FRAME() ((__sanitizer::uptr)__builtin_frame_address(0))
inline void Trap() {
__builtin_trap();
More information about the llvm-commits
mailing list