Revert "LTOCodeGenerator: handle correctly "unnamed" symbol"

This reverts commit r268658.

I incorrectly diagnose this as the source of an assertion during an
LTO bootstrap of clang.

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 268680
This commit is contained in:
Mehdi Amini 2016-05-05 20:44:21 +00:00
parent 450a80754f
commit 5eba657ff3
1 changed files with 1 additions and 1 deletions

View File

@ -364,7 +364,7 @@ void LTOCodeGenerator::preserveDiscardableGVs(
}
llvm::Type *i8PTy = llvm::Type::getInt8PtrTy(TheModule.getContext());
auto mayPreserveGlobal = [&](GlobalValue &GV) {
if (!GV.isDiscardableIfUnused() || GV.isDeclaration() || !GV.hasName())
if (!GV.isDiscardableIfUnused() || GV.isDeclaration())
return;
if (!mustPreserveGV(GV))
return;