[lld] r205569 - Simplify two if's.

Rui Ueyama ruiu at google.com
Thu Apr 3 14:11:23 PDT 2014


Author: ruiu
Date: Thu Apr  3 16:11:22 2014
New Revision: 205569

URL: http://llvm.org/viewvc/llvm-project?rev=205569&view=rev
Log:
Simplify two if's.

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=205569&r1=205568&r2=205569&view=diff
==============================================================================
--- lld/trunk/lib/Core/Resolver.cpp (original)
+++ lld/trunk/lib/Core/Resolver.cpp Thu Apr  3 16:11:22 2014
@@ -247,11 +247,9 @@ void Resolver::doDefinedAtom(const Defin
     _symbolTable.add(atom);
   }
 
-  if (_context.deadStrip()) {
-    // add to set of dead-strip-roots, all symbols that
-    // the compiler marks as don't strip
-    if (atom.deadStrip() == DefinedAtom::deadStripNever)
-      _deadStripRoots.insert(&atom);
+  // An atom that should never be dead-stripped is a dead-strip root.
+  if (_context.deadStrip() && atom.deadStrip() == DefinedAtom::deadStripNever) {
+    _deadStripRoots.insert(&atom);
   }
 }
 





More information about the llvm-commits mailing list