diff options
author | Reid Kleckner <rnk@google.com> | 2018-11-08 00:57:33 +0000 |
---|---|---|
committer | Reid Kleckner <rnk@google.com> | 2018-11-08 00:57:33 +0000 |
commit | b41b37217122aac6a2b7d56366e0afa7b636a96f (patch) | |
tree | b006c238f528b8a9ed359c5ef7f7843b8ddca88f /llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp | |
parent | c8f7e6c1a9dd656c618fca015868112cfdf62c00 (diff) | |
download | bcm5719-llvm-b41b37217122aac6a2b7d56366e0afa7b636a96f.tar.gz bcm5719-llvm-b41b37217122aac6a2b7d56366e0afa7b636a96f.zip |
[sancov] Put .SCOV* sections into the right comdat groups on COFF
Avoids linker errors about relocations against discarded sections.
This was uncovered during the Chromium clang roll here:
https://chromium-review.googlesource.com/c/chromium/src/+/1321863#message-717516acfcf829176f6a2f50980f7a4bdd66469a
After this change, Chromium's libGLESv2 links successfully for me.
Reviewers: metzman, hans, morehouse
Differential Revision: https://reviews.llvm.org/D54232
llvm-svn: 346381
Diffstat (limited to 'llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp')
-rw-r--r-- | llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp b/llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp index 34a66296f6f..91021604169 100644 --- a/llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp +++ b/llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp @@ -743,7 +743,8 @@ void HWAddressSanitizer::createFrameGlobal(Function &F, appendToCompilerUsed(M, GV); // Put GV into the F's Comadat so that if F is deleted GV can be deleted too. if (&F != HwasanCtorFunction) - if (auto Comdat = GetOrCreateFunctionComdat(F, CurModuleUniqueId)) + if (auto Comdat = + GetOrCreateFunctionComdat(F, TargetTriple, CurModuleUniqueId)) GV->setComdat(Comdat); } |