[llvm-commits] [compiler-rt] r159341 - /compiler-rt/trunk/lib/tsan/rtl/tsan_interceptors2.cc
Dmitry Vyukov
dvyukov at google.com
Thu Jun 28 02:04:45 PDT 2012
Author: dvyukov
Date: Thu Jun 28 04:04:45 2012
New Revision: 159341
URL: http://llvm.org/viewvc/llvm-project?rev=159341&view=rev
Log:
tsan: add missing file (forgot to svn add in r159294)
Added:
compiler-rt/trunk/lib/tsan/rtl/tsan_interceptors2.cc (with props)
Added: compiler-rt/trunk/lib/tsan/rtl/tsan_interceptors2.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/rtl/tsan_interceptors2.cc?rev=159341&view=auto
==============================================================================
--- compiler-rt/trunk/lib/tsan/rtl/tsan_interceptors2.cc (added)
+++ compiler-rt/trunk/lib/tsan/rtl/tsan_interceptors2.cc Thu Jun 28 04:04:45 2012
@@ -0,0 +1,35 @@
+//===-- tsan_interceptors2.cc ---------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// This file is a part of ThreadSanitizer (TSan), a race detector.
+//
+//===----------------------------------------------------------------------===//
+
+#include "interception/interception.h"
+#include "sanitizer_common/sanitizer_common.h"
+
+namespace __tsan {
+ void *intercept_memset(uptr, void*, int, uptr);
+ void *intercept_memcpy(uptr, void*, const void*, uptr);
+ int intercept_memcmp(uptr, const void*, const void*, uptr);
+}
+
+using namespace __tsan; // NOLINT
+
+INTERCEPTOR(void*, memset, void *dst, int v, uptr size) {
+ return intercept_memset((uptr)__builtin_return_address(0), dst, v, size);
+}
+
+INTERCEPTOR(void*, memcpy, void *dst, const void *src, uptr size) {
+ return intercept_memcpy((uptr)__builtin_return_address(0), dst, src, size);
+}
+
+INTERCEPTOR(int, memcmp, const void *s1, const void *s2, uptr n) {
+ return intercept_memcmp((uptr)__builtin_return_address(0), s1, s2, n);
+}
Propchange: compiler-rt/trunk/lib/tsan/rtl/tsan_interceptors2.cc
------------------------------------------------------------------------------
svn:eol-style = LF
More information about the llvm-commits
mailing list