Skip to content

Commit 7779f49

Browse files
committed
tsan: remove unused caller_pc from TsanInterceptorContext
Reviewed By: melver Differential Revision: https://reviews.llvm.org/D107340
1 parent 76fd3d4 commit 7779f49

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2230,7 +2230,6 @@ static int OnExit(ThreadState *thr) {
22302230

22312231
struct TsanInterceptorContext {
22322232
ThreadState *thr;
2233-
const uptr caller_pc;
22342233
const uptr pc;
22352234
};
22362235

@@ -2271,17 +2270,17 @@ static void HandleRecvmsg(ThreadState *thr, uptr pc,
22712270
((TsanInterceptorContext *) ctx)->pc, (uptr) ptr, size, \
22722271
false)
22732272

2274-
#define COMMON_INTERCEPTOR_ENTER(ctx, func, ...) \
2275-
SCOPED_TSAN_INTERCEPTOR(func, __VA_ARGS__); \
2276-
TsanInterceptorContext _ctx = {thr, caller_pc, pc}; \
2277-
ctx = (void *)&_ctx; \
2278-
(void) ctx;
2273+
#define COMMON_INTERCEPTOR_ENTER(ctx, func, ...) \
2274+
SCOPED_TSAN_INTERCEPTOR(func, __VA_ARGS__); \
2275+
TsanInterceptorContext _ctx = {thr, pc}; \
2276+
ctx = (void *)&_ctx; \
2277+
(void)ctx;
22792278

22802279
#define COMMON_INTERCEPTOR_ENTER_NOIGNORE(ctx, func, ...) \
22812280
SCOPED_INTERCEPTOR_RAW(func, __VA_ARGS__); \
2282-
TsanInterceptorContext _ctx = {thr, caller_pc, pc}; \
2281+
TsanInterceptorContext _ctx = {thr, pc}; \
22832282
ctx = (void *)&_ctx; \
2284-
(void) ctx;
2283+
(void)ctx;
22852284

22862285
#define COMMON_INTERCEPTOR_FILE_OPEN(ctx, file, path) \
22872286
if (path) \

0 commit comments

Comments
 (0)