[lld] r195282 - Reverse the condition for readability.

Rui Ueyama ruiu at google.com
Wed Nov 20 15:54:52 PST 2013


Author: ruiu
Date: Wed Nov 20 17:54:52 2013
New Revision: 195282

URL: http://llvm.org/viewvc/llvm-project?rev=195282&view=rev
Log:
Reverse the condition for readability.

Modified:
    lld/trunk/lib/Driver/WinLinkInputGraph.cpp

Modified: lld/trunk/lib/Driver/WinLinkInputGraph.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/Driver/WinLinkInputGraph.cpp?rev=195282&r1=195281&r2=195282&view=diff
==============================================================================
--- lld/trunk/lib/Driver/WinLinkInputGraph.cpp (original)
+++ lld/trunk/lib/Driver/WinLinkInputGraph.cpp Wed Nov 20 17:54:52 2013
@@ -60,9 +60,9 @@ ErrorOr<StringRef> PECOFFFileNode::getPa
 }
 
 ErrorOr<StringRef> PECOFFLibraryNode::getPath(const LinkingContext &) const {
-  if (!_path.endswith_lower(".lib"))
-    return _ctx.searchLibraryFile(_ctx.allocateString(_path.str() + ".lib"));
-  return _ctx.searchLibraryFile(_path);
+  if (_path.endswith_lower(".lib"))
+    return _ctx.searchLibraryFile(_path);
+  return _ctx.searchLibraryFile(_ctx.allocateString(_path.str() + ".lib"));
 }
 
 } // end anonymous namespace





More information about the llvm-commits mailing list