[LTO] Simplify unnamed_addr handling logic. NFCI.

llvm-svn: 280224
This commit is contained in:
Davide Italiano 2016-08-31 12:20:46 +00:00
parent e5532a12f7
commit 30ed8106ad
1 changed files with 3 additions and 6 deletions

View File

@ -194,12 +194,9 @@ void BitcodeCompiler::add(BitcodeFile &F) {
if (BitcodeFile::shouldSkip(Flags))
continue;
Symbol *S = Syms[BodyIndex++];
if (GV) {
if (S->HasUnnamedAddr)
GV->setUnnamedAddr(GlobalValue::UnnamedAddr::Global);
else
GV->setUnnamedAddr(GlobalValue::UnnamedAddr::None);
}
if (GV)
GV->setUnnamedAddr(S->HasUnnamedAddr ? GlobalValue::UnnamedAddr::Global
: GlobalValue::UnnamedAddr::None);
if (Flags & BasicSymbolRef::SF_Undefined) {
handleUndefinedAsmRefs(Sym, GV, AsmUndefinedRefs);
continue;