[PATCH] Reload undefined atoms to use possibly new undefines.

Rui Ueyama ruiu at google.com
Fri Nov 15 12:27:13 PST 2013


  Rebased with master. Ping?

http://llvm-reviews.chandlerc.com/D2162

CHANGE SINCE LAST DIFF
  http://llvm-reviews.chandlerc.com/D2162?vs=5493&id=5585#toc

Files:
  lib/Core/Resolver.cpp

Index: lib/Core/Resolver.cpp
===================================================================
--- lib/Core/Resolver.cpp
+++ lib/Core/Resolver.cpp
@@ -111,7 +111,9 @@
       // If the undefined symbol has an alternative name, try to resolve the
       // symbol with the name to give it a second chance. This feature is used
       // for COFF "weak external" symbol.
-      if (!_symbolTable.isDefined(undefName)) {
+      const Atom *maybeUndefAtom = _symbolTable.findByName(undefName);
+      assert(maybeUndefAtom);
+      if (auto *undefAtom = dyn_cast<const UndefinedAtom>(maybeUndefAtom)) {
         if (const UndefinedAtom *fallbackUndefAtom = undefAtom->fallback()) {
           _symbolTable.addReplacement(undefAtom, fallbackUndefAtom);
           _symbolTable.add(*fallbackUndefAtom);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D2162.2.patch
Type: text/x-patch
Size: 798 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131115/14a319c7/attachment.bin>


More information about the llvm-commits mailing list