[PATCH] D105445: [InstrProfiling] Use llvm.compiler.used if applicable for Mach-O

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 5 12:59:40 PDT 2021


MaskRay created this revision.
Herald added a subscriber: hiraditya.
MaskRay requested review of this revision.
Herald added projects: Sanitizers, LLVM.
Herald added subscribers: llvm-commits, Sanitizers.

Similar to D97585 <https://reviews.llvm.org/D97585>.

D25456 <https://reviews.llvm.org/D25456> used `S_ATTR_LIVE_SUPPORT` to ensure the data variable will be retained
or discarded as a unit with the counter variable, so llvm.compiler.used is
sufficient.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D105445

Files:
  compiler-rt/test/profile/Darwin/coverage-linkage.cpp
  compiler-rt/test/profile/Darwin/lit.local.cfg.py
  llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp
  llvm/test/Instrumentation/InstrProfiling/profiling.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D105445.356560.patch
Type: text/x-patch
Size: 4435 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210705/f3a764aa/attachment.bin>


More information about the llvm-commits mailing list