[lld] r204354 - [Mips] Join two for loops over defined atoms into the single one.

Simon Atanasyan simon at atanasyan.com
Thu Mar 20 09:26:16 PDT 2014


Author: atanasyan
Date: Thu Mar 20 11:26:15 2014
New Revision: 204354

URL: http://llvm.org/viewvc/llvm-project?rev=204354&view=rev
Log:
[Mips] Join two for loops over defined atoms into the single one.

Modified:
    lld/trunk/lib/ReaderWriter/ELF/Mips/MipsRelocationPass.cpp

Modified: lld/trunk/lib/ReaderWriter/ELF/Mips/MipsRelocationPass.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/Mips/MipsRelocationPass.cpp?rev=204354&r1=204353&r2=204354&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/Mips/MipsRelocationPass.cpp (original)
+++ lld/trunk/lib/ReaderWriter/ELF/Mips/MipsRelocationPass.cpp Thu Mar 20 11:26:15 2014
@@ -180,13 +180,12 @@ RelocationPass::RelocationPass(MipsLinki
 }
 
 void RelocationPass::perform(std::unique_ptr<MutableFile> &mf) {
-  for (const auto &atom : mf->defined())
-    calculateAHLs(*atom);
-
   // Process all references.
-  for (const auto &atom : mf->defined())
+  for (const auto &atom : mf->defined()) {
+    calculateAHLs(*atom);
     for (const auto &ref : *atom)
       handleReference(*ref);
+  }
 
   uint64_t ordinal = 0;
 





More information about the llvm-commits mailing list