[asan] Fix a false positive ODR violation due to LTO ConstantMerge pass [llvm part...
authorKuba Mracek <mracek@apple.com>
Thu, 8 Mar 2018 20:05:45 +0000 (20:05 +0000)
committerKuba Mracek <mracek@apple.com>
Thu, 8 Mar 2018 20:05:45 +0000 (20:05 +0000)
commit584bd10803640444812afdf7ed76fabf56fc3d85
tree9e612f55de349030eeae67216603809490032b51
parent45ae11cd80ab83d11c6310c954b0537c2d863a91
[asan] Fix a false positive ODR violation due to LTO ConstantMerge pass [llvm part, take 2]

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