From: Mehdi Amini Date: Thu, 5 May 2016 20:44:21 +0000 (+0000) Subject: Revert "LTOCodeGenerator: handle correctly "unnamed" symbol" X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0e8fd429e3beb140ede34cd470972d8b26d86c39;p=llvm 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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268680 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/LTO/LTOCodeGenerator.cpp b/lib/LTO/LTOCodeGenerator.cpp index a7dad55a819..77b827a294b 100644 --- a/lib/LTO/LTOCodeGenerator.cpp +++ b/lib/LTO/LTOCodeGenerator.cpp @@ -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;