[asan] Fix a false positive ODR violation due to LTO ConstantMerge pass [llvm part]
authorKuba Mracek <mracek@apple.com>
Thu, 8 Mar 2018 17:24:06 +0000 (17:24 +0000)
committerKuba Mracek <mracek@apple.com>
Thu, 8 Mar 2018 17:24:06 +0000 (17:24 +0000)
commit0e06d37dba6e997bc75477523b313c5ba442e792
treefa7da2c88ae83f8722d904642648b128ef03c353
parent788a4336cd8e84da0c8e572d6cbf012e1204b7f1
[asan] Fix a false positive ODR violation due to LTO ConstantMerge pass [llvm part]

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: 327029
llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
llvm/test/Instrumentation/AddressSanitizer/global_lto_merge.ll [new file with mode: 0644]