[SanitizerCoverage] Create comdat for global arrays.
authorMatt Morehouse <mascasa@google.com>
Thu, 13 Sep 2018 21:45:55 +0000 (21:45 +0000)
committerMatt Morehouse <mascasa@google.com>
Thu, 13 Sep 2018 21:45:55 +0000 (21:45 +0000)
commit3bea25e5543606758ab10d395b1e7283255be75b
tree17e7690ff7da19c1e9aa1a3ce69ad7fc1ac3309a
parent3815e702e751efb14188c0f0beeb10e343d8f053
[SanitizerCoverage] Create comdat for global arrays.

Summary:
Place global arrays in comdat sections with their associated functions.
This makes sure they are stripped along with the functions they
reference, even on the BFD linker.

Reviewers: eugenis

Reviewed By: eugenis

Subscribers: eraman, hiraditya, llvm-commits

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

llvm-svn: 342186
llvm/lib/Transforms/Instrumentation/SanitizerCoverage.cpp
llvm/test/Instrumentation/SanitizerCoverage/div-tracing.ll
llvm/test/Instrumentation/SanitizerCoverage/gep-tracing.ll
llvm/test/Instrumentation/SanitizerCoverage/inline-8bit-counters.ll
llvm/test/Instrumentation/SanitizerCoverage/pc-table.ll
llvm/test/Instrumentation/SanitizerCoverage/tracing.ll