OSDN Git Service

[SanitizerCoverage] Add associated metadata to pc-tables.
authorMatt Morehouse <mascasa@google.com>
Fri, 15 Jun 2018 20:12:58 +0000 (20:12 +0000)
committerMatt Morehouse <mascasa@google.com>
Fri, 15 Jun 2018 20:12:58 +0000 (20:12 +0000)
commit9fcdc897848f1a147adf368d4578f3c0341cbd4f
tree7e8011dd5bbbc9deba1ce3a97983dc4ed87eb03c
parentf1d55911bf10189c7f619970ce3b3e2274e61cb3
[SanitizerCoverage] Add associated metadata to pc-tables.

Summary:
Using associated metadata rather than llvm.used allows linkers to
perform dead stripping with -fsanitize-coverage=pc-table.  Unfortunately
in my local tests, LLD was the only linker that made use of this metadata.

Partially addresses https://bugs.llvm.org/show_bug.cgi?id=34636 and fixes
https://github.com/google/sanitizers/issues/971.

Reviewers: eugenis

Reviewed By: eugenis

Subscribers: Dor1s, hiraditya, llvm-commits, kcc

Differential Revision: https://reviews.llvm.org/D48203

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@334858 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Instrumentation/SanitizerCoverage.cpp