[PATCH] D28375: [compiler-rt] Make macros use __sanitizer::uptr instead of just uptr.
Vitaly Buka via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 5 13:36:18 PST 2017
This revision was automatically updated to reflect the committed changes.
Closed by commit rL291175: [compiler-rt] Make macros use __sanitizer::uptr instead of just uptr. (authored by vitalybuka).
Changed prior to commit:
https://reviews.llvm.org/D28375?vs=83292&id=83299#toc
Repository:
rL LLVM
https://reviews.llvm.org/D28375
Files:
compiler-rt/trunk/lib/sanitizer_common/sanitizer_internal_defs.h
Index: compiler-rt/trunk/lib/sanitizer_common/sanitizer_internal_defs.h
===================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_internal_defs.h
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_internal_defs.h
@@ -289,19 +289,20 @@
enum LinkerInitialized { LINKER_INITIALIZED = 0 };
#if !defined(_MSC_VER) || defined(__clang__)
-# define GET_CALLER_PC() (uptr)__builtin_return_address(0)
-# define GET_CURRENT_FRAME() (uptr)__builtin_frame_address(0)
+#define GET_CALLER_PC() (__sanitizer::uptr) __builtin_return_address(0)
+#define GET_CURRENT_FRAME() (__sanitizer::uptr) __builtin_frame_address(0)
inline void Trap() {
__builtin_trap();
}
#else
extern "C" void* _ReturnAddress(void);
extern "C" void* _AddressOfReturnAddress(void);
# pragma intrinsic(_ReturnAddress)
# pragma intrinsic(_AddressOfReturnAddress)
-# define GET_CALLER_PC() (uptr)_ReturnAddress()
+#define GET_CALLER_PC() (__sanitizer::uptr) _ReturnAddress()
// CaptureStackBackTrace doesn't need to know BP on Windows.
-# define GET_CURRENT_FRAME() (((uptr)_AddressOfReturnAddress()) + sizeof(uptr))
+#define GET_CURRENT_FRAME() \
+ (((__sanitizer::uptr)_AddressOfReturnAddress()) + sizeof(__sanitizer::uptr))
extern "C" void __ud2(void);
# pragma intrinsic(__ud2)
@@ -319,11 +320,11 @@
}
// Forces the compiler to generate a frame pointer in the function.
-#define ENABLE_FRAME_POINTER \
- do { \
- volatile uptr enable_fp; \
- enable_fp = GET_CURRENT_FRAME(); \
- (void)enable_fp; \
+#define ENABLE_FRAME_POINTER \
+ do { \
+ volatile __sanitizer::uptr enable_fp; \
+ enable_fp = GET_CURRENT_FRAME(); \
+ (void)enable_fp; \
} while (0)
} // namespace __sanitizer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D28375.83299.patch
Type: text/x-patch
Size: 2038 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170105/93e2183b/attachment.bin>
More information about the llvm-commits
mailing list