[all-commits] [llvm/llvm-project] 4c663a: [TSan][Apple] Fix interceptor build error

Julian Lettner via All-commits all-commits at lists.llvm.org
Fri Jan 24 13:14:44 PST 2025


  Branch: refs/heads/users/yln/tsan-uneclared-identifier-OSSpinLockUnlock
  Home:   https://github.com/llvm/llvm-project
  Commit: 4c663a836c24579ebd4358d0e6ee4ee7d6e4443e
      https://github.com/llvm/llvm-project/commit/4c663a836c24579ebd4358d0e6ee4ee7d6e4443e
  Author: Julian Lettner <jlettner at apple.com>
  Date:   2025-01-24 (Fri, 24 Jan 2025)

  Changed paths:
    M compiler-rt/lib/tsan/rtl/tsan_interceptors_mac.cpp
    R compiler-rt/lib/tsan/rtl/tsan_spinlock_defs_mac.h

  Log Message:
  -----------
  [TSan][Apple] Fix interceptor build error

In certain cases, the SDK headers declare
`OSSpinLock*` APIs as macros (instead of
functions), so users can be transparently
forwarded to non-deprecated APIs.

When enabled, building of TSan interceptors failed
because these macros interfere with the
interceptor machinery, i.e., they prevent proper
forward declaration of intercepted APIs.

In a previous change [1], we misattributed this to
the deprecation of `OSSpinLock*` APIs.

[1] ae484c21c05668f84b13304c28bc39f753e493de

rdar://143193907


  Commit: f6488f97e17566cf2478e51e35b7f1c879fa7e6b
      https://github.com/llvm/llvm-project/commit/f6488f97e17566cf2478e51e35b7f1c879fa7e6b
  Author: Julian Lettner <jlettner at apple.com>
  Date:   2025-01-24 (Fri, 24 Jan 2025)

  Changed paths:
    M compiler-rt/lib/tsan/rtl/tsan_interceptors_mac.cpp

  Log Message:
  -----------
  [TSan][Apple] Prevent disabling deprecation warnings for entire file

Add missing `#pragma clang diagnostic pop` to
prevent disabling deprecation warnings for the
rest of the file.


Compare: https://github.com/llvm/llvm-project/compare/f552c5580871...f6488f97e175

To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list