forked from OSchip/llvm-project
[TSan][libdispatch] Fix compilation error on Linux
The interceptor for the block variants of the API references the function versions (via `REAL(name##_f)`). On Linux, this accesses the underlying "real pointer", defined by the interceptor macro. So we need to declare interceptors in the right order to avoid undefined symbol compiler error: ``` error: no member named 'real_dispatch_async_and_wait_f' in namespace '__tsan::__interception' ``` rdar://68181542
This commit is contained in:
parent
8d2d0e8485
commit
4cefa8614f
|
@ -240,10 +240,10 @@ SANITIZER_WEAK_IMPORT void dispatch_barrier_async_and_wait(
|
|||
SANITIZER_WEAK_IMPORT void dispatch_barrier_async_and_wait_f(
|
||||
dispatch_queue_t queue, void *context, dispatch_function_t work);
|
||||
|
||||
DISPATCH_INTERCEPT_SYNC_B(dispatch_async_and_wait, false)
|
||||
DISPATCH_INTERCEPT_SYNC_F(dispatch_async_and_wait_f, false)
|
||||
DISPATCH_INTERCEPT_SYNC_B(dispatch_barrier_async_and_wait, true)
|
||||
DISPATCH_INTERCEPT_SYNC_B(dispatch_async_and_wait, false)
|
||||
DISPATCH_INTERCEPT_SYNC_F(dispatch_barrier_async_and_wait_f, true)
|
||||
DISPATCH_INTERCEPT_SYNC_B(dispatch_barrier_async_and_wait, true)
|
||||
#endif
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue