[SanitizerCoverage] Create comdat for global arrays.
authorMatt Morehouse <mascasa@google.com>
Tue, 11 Sep 2018 15:23:14 +0000 (15:23 +0000)
committerMatt Morehouse <mascasa@google.com>
Tue, 11 Sep 2018 15:23:14 +0000 (15:23 +0000)
commiteac270caf45ce957daf3c01b01a5752a818344bd
tree8b5f5ac01d219822e55b3a2fa825dde2030b16c8
parent873cae5ae7efdbe9fdfe7b7ffba923516b7d14af
[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: 341951
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