[PATCH] D31444: LTO: call getRealLinkageName on IRNames before feeding to getGUID

Bob Haarman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 31 15:08:57 PDT 2017


This revision was automatically updated to reflect the committed changes.
Closed by commit rL299268: LTO: call getRealLinkageName on IRNames before feeding to getGUID (authored by inglorion).

Changed prior to commit:
  https://reviews.llvm.org/D31444?vs=93708&id=93714#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D31444

Files:
  llvm/trunk/lib/LTO/LTO.cpp


Index: llvm/trunk/lib/LTO/LTO.cpp
===================================================================
--- llvm/trunk/lib/LTO/LTO.cpp
+++ llvm/trunk/lib/LTO/LTO.cpp
@@ -971,7 +971,8 @@
           // IRName will be defined if we have seen the prevailing copy of
           // this value. If not, no need to preserve any ThinLTO copies.
           !Res.second.IRName.empty())
-        GUIDPreservedSymbols.insert(GlobalValue::getGUID(Res.second.IRName));
+        GUIDPreservedSymbols.insert(GlobalValue::getGUID(
+            GlobalValue::getRealLinkageName(Res.second.IRName)));
     }
 
     auto DeadSymbols =
@@ -990,10 +991,11 @@
       // partition (and we can't get the GUID).
       if (Res.second.IRName.empty())
         continue;
-      auto GUID = GlobalValue::getGUID(Res.second.IRName);
+      auto GUID = GlobalValue::getGUID(
+          GlobalValue::getRealLinkageName(Res.second.IRName));
       // Mark exported unless index-based analysis determined it to be dead.
       if (!DeadSymbols.count(GUID))
-        ExportedGUIDs.insert(GlobalValue::getGUID(Res.second.IRName));
+        ExportedGUIDs.insert(GUID);
     }
 
     auto isPrevailing = [&](GlobalValue::GUID GUID,


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D31444.93714.patch
Type: text/x-patch
Size: 1190 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170331/81490509/attachment.bin>


More information about the llvm-commits mailing list