[asan] Fix a false positive ODR violation due to LTO ConstantMerge pass [compiler...
authorKuba Mracek <mracek@apple.com>
Thu, 8 Mar 2018 21:02:52 +0000 (21:02 +0000)
committerKuba Mracek <mracek@apple.com>
Thu, 8 Mar 2018 21:02:52 +0000 (21:02 +0000)
commite70e5fcc7eb07acf7ec45930ba3eff035c068f45
tree8ce97af50ea91d5b47b47d1491c5d74163596474
parent8842da8e070866d9e09dd19e2869f395ffd1d7da
[asan] Fix a false positive ODR violation due to LTO ConstantMerge pass [compiler-rt 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. See the included testcase for an example.

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

llvm-svn: 327062
compiler-rt/test/asan/TestCases/Darwin/odr-lto.cc
compiler-rt/test/asan/TestCases/lto-constmerge-odr.cc [new file with mode: 0644]