diff options
author | Matt Morehouse <mascasa@google.com> | 2019-01-15 21:21:01 +0000 |
---|---|---|
committer | Matt Morehouse <mascasa@google.com> | 2019-01-15 21:21:01 +0000 |
commit | 19ff35c48136ae1e61a6cd20d611349b40558d2b (patch) | |
tree | e41fbc4792b049ac0504b3e68284ee76e1486ce7 /llvm/lib/Transforms/Instrumentation/SanitizerCoverage.cpp | |
parent | 4a22fb18c7935c6c1bae1af0b2e4a4c9e256ee04 (diff) | |
download | bcm5719-llvm-19ff35c48136ae1e61a6cd20d611349b40558d2b.tar.gz bcm5719-llvm-19ff35c48136ae1e61a6cd20d611349b40558d2b.zip |
[SanitizerCoverage] Don't create comdat for interposable functions.
Summary:
Comdat groups override weak symbol behavior, allowing the linker to keep
the comdats for weak symbols in favor of comdats for strong symbols.
Fixes the issue described in:
https://bugs.chromium.org/p/chromium/issues/detail?id=918662
Reviewers: eugenis, pcc, rnk
Reviewed By: pcc, rnk
Subscribers: smeenai, rnk, bd1976llvm, hiraditya, llvm-commits
Differential Revision: https://reviews.llvm.org/D56516
llvm-svn: 351247
Diffstat (limited to 'llvm/lib/Transforms/Instrumentation/SanitizerCoverage.cpp')
-rw-r--r-- | llvm/lib/Transforms/Instrumentation/SanitizerCoverage.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Instrumentation/SanitizerCoverage.cpp b/llvm/lib/Transforms/Instrumentation/SanitizerCoverage.cpp index 729197fcefd..0ba8d5765e8 100644 --- a/llvm/lib/Transforms/Instrumentation/SanitizerCoverage.cpp +++ b/llvm/lib/Transforms/Instrumentation/SanitizerCoverage.cpp @@ -568,7 +568,7 @@ GlobalVariable *SanitizerCoverageModule::CreateFunctionLocalArrayInSection( *CurModule, ArrayTy, false, GlobalVariable::PrivateLinkage, Constant::getNullValue(ArrayTy), "__sancov_gen_"); - if (TargetTriple.supportsCOMDAT()) + if (TargetTriple.supportsCOMDAT() && !F.isInterposable()) if (auto Comdat = GetOrCreateFunctionComdat(F, TargetTriple, CurModuleUniqueId)) Array->setComdat(Comdat); |