[SanitizerCoverage] Add associated metadata to 8-bit counters.
authorMatt Morehouse <mascasa@google.com>
Thu, 12 Jul 2018 20:24:58 +0000 (20:24 +0000)
committerMatt Morehouse <mascasa@google.com>
Thu, 12 Jul 2018 20:24:58 +0000 (20:24 +0000)
commit45438161503f1688ed4af9ffda626b5c79454781
tree46dd5400322fba0e73ce5db7263cd062a8219302
parent94259ba13af6ba594fc1bd17611f15511d1730c0
[SanitizerCoverage] Add associated metadata to 8-bit counters.

Summary:
This allows counters associated with unused functions to be
dead-stripped along with their functions.  This approach is the same one
we used for PC tables.

Fixes an issue where LLD removes an unused PC table but leaves the 8-bit
counter.

Reviewers: eugenis

Reviewed By: eugenis

Subscribers: llvm-commits, hiraditya, kcc

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

llvm-svn: 336941
compiler-rt/test/fuzzer/gc-sections.test
llvm/lib/Transforms/Instrumentation/SanitizerCoverage.cpp