HomePhabricator

[ThinLTO] Don't internalize weak writeable variables

Authored by evgeny777 on May 13 2019, 4:53 AM.

Description

[ThinLTO] Don't internalize weak writeable variables

Variables with linkonce_odr and weak_odr linkage shouldn't be internalized
if they're not readonly. Otherwise we may end up with multiple copies of
such variable, so reads and writes will become inconsistent

Differential revision: https://reviews.llvm.org/D61255

llvm-svn: 360577