[lld] r230813 - Remove a varaible that's used only once. NFC.

Rui Ueyama ruiu at google.com
Fri Feb 27 15:36:05 PST 2015


Author: ruiu
Date: Fri Feb 27 17:36:05 2015
New Revision: 230813

URL: http://llvm.org/viewvc/llvm-project?rev=230813&view=rev
Log:
Remove a varaible that's used only once. NFC.

Modified:
    lld/trunk/lib/Core/Resolver.cpp

Modified: lld/trunk/lib/Core/Resolver.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/Core/Resolver.cpp?rev=230813&r1=230812&r2=230813&view=diff
==============================================================================
--- lld/trunk/lib/Core/Resolver.cpp (original)
+++ lld/trunk/lib/Core/Resolver.cpp Fri Feb 27 17:36:05 2015
@@ -422,27 +422,26 @@ bool Resolver::checkUndefines() {
   if (!undefinedAtoms.empty()) {
     // FIXME: need diagnostics interface for writing error messages
     bool foundUndefines = false;
-    for (const UndefinedAtom *undefAtom : undefinedAtoms) {
-      const File &f = undefAtom->file();
-
+    for (const UndefinedAtom *undef : undefinedAtoms) {
       // Skip over a weak symbol.
-      if (undefAtom->canBeNull() != UndefinedAtom::canBeNullNever)
+      if (undef->canBeNull() != UndefinedAtom::canBeNullNever)
         continue;
 
       // If this is a library and undefined symbols are allowed on the
       // target platform, skip over it.
-      if (isa<SharedLibraryFile>(f) && _context.allowShlibUndefines())
+      if (isa<SharedLibraryFile>(undef->file()) &&
+          _context.allowShlibUndefines())
         continue;
 
       // If the undefine is coalesced away, skip over it.
-      if (_symbolTable.isCoalescedAway(undefAtom))
+      if (_symbolTable.isCoalescedAway(undef))
         continue;
 
       // Seems like this symbol is undefined. Warn that.
       foundUndefines = true;
       if (_context.printRemainingUndefines()) {
-        llvm::errs() << "Undefined symbol: " << undefAtom->file().path()
-                     << ": " << _context.demangle(undefAtom->name())
+        llvm::errs() << "Undefined symbol: " << undef->file().path()
+                     << ": " << _context.demangle(undef->name())
                      << "\n";
       }
     }





More information about the llvm-commits mailing list