diff options
author | Vitaly Buka <vitalybuka@google.com> | 2018-12-20 00:30:27 +0000 |
---|---|---|
committer | Vitaly Buka <vitalybuka@google.com> | 2018-12-20 00:30:27 +0000 |
commit | 07a55f27dc427df06c5354912d4053e21c84f9ef (patch) | |
tree | 731d2389cc5dbc63ab55e5d1f05e3c8bf345adb1 /llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp | |
parent | d414e1bbb547aabdadecd0fccc23bda41adf5d99 (diff) | |
download | bcm5719-llvm-07a55f27dc427df06c5354912d4053e21c84f9ef.tar.gz bcm5719-llvm-07a55f27dc427df06c5354912d4053e21c84f9ef.zip |
[asan] Undo special treatment of linkonce_odr and weak_odr
Summary:
On non-Windows these are already removed by ShouldInstrumentGlobal.
On Window we will wait until we get actual issues with that.
Reviewers: pcc
Subscribers: hiraditya, llvm-commits
Differential Revision: https://reviews.llvm.org/D55899
llvm-svn: 349707
Diffstat (limited to 'llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp')
-rw-r--r-- | llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp b/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp index 0c7aec4ac69..ef8e60d5a1f 100644 --- a/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp +++ b/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp @@ -2201,10 +2201,8 @@ bool AddressSanitizerModule::InstrumentGlobals(IRBuilder<> &IRB, Module &M, bool GlobalAlias::create(GlobalValue::PrivateLinkage, "", NewGlobal); } - // ODR check is not useful for the following, but we see false reports - // caused by linker optimizations. - if (NewGlobal->hasLocalLinkage() || NewGlobal->hasLinkOnceODRLinkage() || - NewGlobal->hasWeakODRLinkage()) { + // ODR should not happen for local linkage. + if (NewGlobal->hasLocalLinkage()) { ODRIndicator = ConstantExpr::getIntToPtr(ConstantInt::get(IntptrTy, -1), IRB.getInt8PtrTy()); } else if (UseOdrIndicator) { |