Use StringRef::equals_lower(). No functionality change.
authorRui Ueyama <ruiu@google.com>
Wed, 31 Jul 2013 23:53:58 +0000 (23:53 +0000)
committerRui Ueyama <ruiu@google.com>
Wed, 31 Jul 2013 23:53:58 +0000 (23:53 +0000)
llvm-svn: 187548

lld/lib/ReaderWriter/PECOFF/PECOFFTargetInfo.cpp

index b1f599c..8d11a20 100644 (file)
@@ -90,10 +90,10 @@ void PECOFFTargetInfo::addImplicitFiles(InputFiles &files) const {
 /// Append the given file to the input file list. The file must be an object
 /// file or an import library file.
 void PECOFFTargetInfo::appendInputFileOrLibrary(std::string path) {
-  std::string ext = llvm::sys::path::extension(path).lower();
+  StringRef ext = llvm::sys::path::extension(path);
   // This is an import library file. Look for the library file in the search
   // paths, unless the path contains a directory name.
-  if (ext == ".lib") {
+  if (ext.equals_lower(".lib")) {
     if (containDirectoryName(path)) {
       appendInputFile(path);
       return;