[lld] r193797 - [PECOFF] File extension is case-insensitive on Windows.

Rui Ueyama ruiu at google.com
Thu Oct 31 13:06:48 PDT 2013


Author: ruiu
Date: Thu Oct 31 15:06:48 2013
New Revision: 193797

URL: http://llvm.org/viewvc/llvm-project?rev=193797&view=rev
Log:
[PECOFF] File extension is case-insensitive on Windows.

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

Modified: lld/trunk/lib/Driver/WinLinkDriver.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/Driver/WinLinkDriver.cpp?rev=193797&r1=193796&r2=193797&view=diff
==============================================================================
--- lld/trunk/lib/Driver/WinLinkDriver.cpp (original)
+++ lld/trunk/lib/Driver/WinLinkDriver.cpp Thu Oct 31 15:06:48 2013
@@ -482,7 +482,7 @@ parseArgs(int argc, const char *argv[],
 //
 
 ErrorOr<StringRef> PECOFFFileNode::getPath(const LinkingContext &) const {
-  if (_path.endswith(".lib"))
+  if (_path.endswith_lower(".lib"))
     return _ctx.searchLibraryFile(_path);
   if (llvm::sys::path::extension(_path).empty())
     return _ctx.allocateString(_path.str() + ".obj");
@@ -490,7 +490,7 @@ ErrorOr<StringRef> PECOFFFileNode::getPa
 }
 
 ErrorOr<StringRef> PECOFFLibraryNode::getPath(const LinkingContext &) const {
-  if (!_path.endswith(".lib"))
+  if (!_path.endswith_lower(".lib"))
     return _ctx.searchLibraryFile(_ctx.allocateString(_path.str() + ".lib"));
   return _ctx.searchLibraryFile(_path);
 }





More information about the llvm-commits mailing list