[lld] r187548 - Use StringRef::equals_lower(). No functionality change.

Rui Ueyama ruiu at google.com
Wed Jul 31 16:53:58 PDT 2013


Author: ruiu
Date: Wed Jul 31 18:53:58 2013
New Revision: 187548

URL: http://llvm.org/viewvc/llvm-project?rev=187548&view=rev
Log:
Use StringRef::equals_lower(). No functionality change.

Modified:
    lld/trunk/lib/ReaderWriter/PECOFF/PECOFFTargetInfo.cpp

Modified: lld/trunk/lib/ReaderWriter/PECOFF/PECOFFTargetInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/PECOFF/PECOFFTargetInfo.cpp?rev=187548&r1=187547&r2=187548&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/PECOFF/PECOFFTargetInfo.cpp (original)
+++ lld/trunk/lib/ReaderWriter/PECOFF/PECOFFTargetInfo.cpp Wed Jul 31 18:53:58 2013
@@ -90,10 +90,10 @@ void PECOFFTargetInfo::addImplicitFiles(
 /// 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;





More information about the llvm-commits mailing list