[asan] Fix a false positive ODR violation due to LTO ConstantMerge pass [llvm part...
authorKuba Mracek <mracek@apple.com>
Thu, 8 Mar 2018 21:02:18 +0000 (21:02 +0000)
committerKuba Mracek <mracek@apple.com>
Thu, 8 Mar 2018 21:02:18 +0000 (21:02 +0000)
commit8842da8e070866d9e09dd19e2869f395ffd1d7da
tree4ee944b26ca1e7c40e000ac5a98712487990b863
parent0f701c4a954211827b9f4cc08536b2aff88a6f89
[asan] Fix a false positive ODR violation due to LTO ConstantMerge pass [llvm part, take 3]

This fixes a false positive ODR violation that is reported by ASan when using LTO. In cases, where two constant globals have the same value, LTO will merge them, which breaks ASan's ODR detection.

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

llvm-svn: 327061
llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
llvm/test/Instrumentation/AddressSanitizer/global_lto_merge.ll [new file with mode: 0644]