]> granicus.if.org Git - llvm/commitdiff
Revert "LTOCodeGenerator: handle correctly "unnamed" symbol"
authorMehdi Amini <mehdi.amini@apple.com>
Thu, 5 May 2016 20:44:21 +0000 (20:44 +0000)
committerMehdi Amini <mehdi.amini@apple.com>
Thu, 5 May 2016 20:44:21 +0000 (20:44 +0000)
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>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268680 91177308-0d34-0410-b5e6-96231b3b80d8

lib/LTO/LTOCodeGenerator.cpp

index a7dad55a81901f9964b4c9cbd79e55d068de1a0c..77b827a294bf5c1b7e27f612ae20835270522ab0 100644 (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;