This is an archive of the discontinued LLVM Phabricator instance.

[TSan][Linux] Fix libdispatch interception macros compilation errors
ClosedPublic

Authored by yln on Mar 6 2019, 6:24 PM.

Details

Summary

Most libdispatch functions come in two variants: callbacks can be
specified via blocks or function pointers. Some of our interceptors for
the block variant actually forward to the function variant. However, on
Linux, DECLARE_REAL(name) has to appear before REAL(name).

This patch reorders _f variant interceptors before _b variants
where possible and forward declares the _f variant in the remaining
cases (cyclic dependency between _f and _b interceptors).

Also rename macro to DISPATCH_INTERCEPT_ASYNC_F for better consistency.

Diff Detail

Repository
rL LLVM

Event Timeline

yln created this revision.Mar 6 2019, 6:24 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptMar 6 2019, 6:24 PM
Herald added subscribers: llvm-commits, Restricted Project, jdoerfert, kubamracek. · View Herald Transcript
dvyukov accepted this revision.Mar 6 2019, 10:15 PM
This revision is now accepted and ready to land.Mar 6 2019, 10:15 PM
This revision was automatically updated to reflect the committed changes.