[llvm] r268680 - Revert "LTOCodeGenerator: handle correctly "unnamed" symbol"

Mehdi Amini via llvm-commits llvm-commits at lists.llvm.org
Thu May 5 13:44:21 PDT 2016


Author: mehdi_amini
Date: Thu May  5 15:44:21 2016
New Revision: 268680

URL: http://llvm.org/viewvc/llvm-project?rev=268680&view=rev
Log:
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 at apple.com>

Modified:
    llvm/trunk/lib/LTO/LTOCodeGenerator.cpp

Modified: llvm/trunk/lib/LTO/LTOCodeGenerator.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/LTO/LTOCodeGenerator.cpp?rev=268680&r1=268679&r2=268680&view=diff
==============================================================================
--- llvm/trunk/lib/LTO/LTOCodeGenerator.cpp (original)
+++ llvm/trunk/lib/LTO/LTOCodeGenerator.cpp Thu May  5 15:44:21 2016
@@ -364,7 +364,7 @@ void LTOCodeGenerator::preserveDiscardab
   }
   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;




More information about the llvm-commits mailing list