diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2018-01-18 05:38:43 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2018-01-18 05:38:43 +0000 |
commit | 8a1ca674616326b1a43f07b7954fea51399fcf72 (patch) | |
tree | 445144ec2fcd2276699491435fc2b90c31b945b1 /llvm/lib/LTO/LTO.cpp | |
parent | df5ec0756c0d680396cf5b2f48e114740d2b2987 (diff) | |
download | llvm-8a1ca674616326b1a43f07b7954fea51399fcf72.zip llvm-8a1ca674616326b1a43f07b7954fea51399fcf72.tar.gz llvm-8a1ca674616326b1a43f07b7954fea51399fcf72.tar.bz2 |
Don't drop dso_local in LTO.
LTO sets dso_local as an optimization, so don't clear it.
This avoid clearing it from undefined hidden symbols, which would then
fail the verifier.
llvm-svn: 322814
Diffstat (limited to 'llvm/lib/LTO/LTO.cpp')
-rw-r--r-- | llvm/lib/LTO/LTO.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/LTO/LTO.cpp b/llvm/lib/LTO/LTO.cpp index 64e5186..a36d640 100644 --- a/llvm/lib/LTO/LTO.cpp +++ b/llvm/lib/LTO/LTO.cpp @@ -639,7 +639,8 @@ LTO::addRegularLTO(BitcodeModule BM, ArrayRef<InputFile::Symbol> Syms, } // Set the 'local' flag based on the linker resolution for this symbol. - GV->setDSOLocal(Res.FinalDefinitionInLinkageUnit); + if (Res.FinalDefinitionInLinkageUnit) + GV->setDSOLocal(Res.FinalDefinitionInLinkageUnit); } // Common resolution: collect the maximum size/alignment over all commons. // We also record if we see an instance of a common as prevailing, so that |