diff options
author | Alexey Samsonov <samsonov@google.com> | 2012-06-15 12:24:07 +0000 |
---|---|---|
committer | Alexey Samsonov <samsonov@google.com> | 2012-06-15 12:24:07 +0000 |
commit | 3efd6fc26c1949f0e5ccf55e1d8653e313e8a003 (patch) | |
tree | 3fa1f35716c0afbcbcd41cd6f806a083f5f33456 /compiler-rt/lib/tsan/rtl/tsan_defs.h | |
parent | f11b42e3965b3f38d84ac763462b40e048f51191 (diff) | |
download | bcm5719-llvm-3efd6fc26c1949f0e5ccf55e1d8653e313e8a003.tar.gz bcm5719-llvm-3efd6fc26c1949f0e5ccf55e1d8653e313e8a003.zip |
[Sanitizer] Use DEFINE_REAL macro in TSan runtime to call libc implementations of functions. Move strchr to sanitizer_libc.
llvm-svn: 158517
Diffstat (limited to 'compiler-rt/lib/tsan/rtl/tsan_defs.h')
-rw-r--r-- | compiler-rt/lib/tsan/rtl/tsan_defs.h | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/compiler-rt/lib/tsan/rtl/tsan_defs.h b/compiler-rt/lib/tsan/rtl/tsan_defs.h index 117b245dee0..5127d5dc46f 100644 --- a/compiler-rt/lib/tsan/rtl/tsan_defs.h +++ b/compiler-rt/lib/tsan/rtl/tsan_defs.h @@ -14,6 +14,7 @@ #ifndef TSAN_DEFS_H #define TSAN_DEFS_H +#include "interception/interception.h" #include "sanitizer_common/sanitizer_internal_defs.h" #include "sanitizer_common/sanitizer_libc.h" #include "tsan_stat.h" @@ -134,13 +135,6 @@ T RoundUp(T p, int align) { return (T)(((u64)p + align - 1) & ~(align - 1)); } -void real_memset(void *ptr, int c, uptr size); -void real_memcpy(void *dst, const void *src, uptr size); -int internal_strncmp(const char *s1, const char *s2, uptr size); -void internal_strcpy(char *s1, const char *s2); -const char *internal_strstr(const char *where, const char *what); -const char *internal_strchr(const char *where, char what); - struct MD5Hash { u64 hash[2]; bool operator==(const MD5Hash &other) const { @@ -160,4 +154,9 @@ class StackTrace; } // namespace __tsan +DECLARE_REAL(void*, memset, void *ptr, int v, uptr size); +DECLARE_REAL(void*, memcpy, void *dst, const void *src, uptr size); +DECLARE_REAL(int, strncmp, const char *s1, const char *s2, uptr n); +DECLARE_REAL(const char*, strstr, const char *s1, const char *s2); + #endif // TSAN_DEFS_H |