[PATCH] D24595: [lib/LTO] Remove now unneded hack for undefined symbols

Davide Italiano via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 14 17:49:38 PDT 2016


davide updated this revision to Diff 71469.
davide added a comment.

Add an assertion, as per Mehdi suggestion.


https://reviews.llvm.org/D24595

Files:
  lib/LTO/LTO.cpp

Index: lib/LTO/LTO.cpp
===================================================================
--- lib/LTO/LTO.cpp
+++ lib/LTO/LTO.cpp
@@ -338,7 +338,8 @@
 
     GlobalValue *GV = Obj->getSymbolGV(Sym.I->getRawDataRefImpl());
     if (Sym.getFlags() & object::BasicSymbolRef::SF_Undefined)
-      continue;
+      assert(!Res.Prevailing &&
+             "An undefined symbol cannot have prevailing resolution");
     if (Res.Prevailing && GV) {
       Keep.push_back(GV);
       switch (GV->getLinkage()) {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D24595.71469.patch
Type: text/x-patch
Size: 503 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160915/74de478b/attachment.bin>


More information about the llvm-commits mailing list