diff options
Diffstat (limited to 'lld/lib/Driver/WinLinkInputGraph.cpp')
-rw-r--r-- | lld/lib/Driver/WinLinkInputGraph.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lld/lib/Driver/WinLinkInputGraph.cpp b/lld/lib/Driver/WinLinkInputGraph.cpp index b8bfcc131ab..7efdf17a86a 100644 --- a/lld/lib/Driver/WinLinkInputGraph.cpp +++ b/lld/lib/Driver/WinLinkInputGraph.cpp @@ -60,9 +60,9 @@ ErrorOr<StringRef> PECOFFFileNode::getPath(const LinkingContext &) const { } 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 |