[lld] r301490 - Remove unnecessary instantiation of StringRef.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 26 16:00:32 PDT 2017


Author: ruiu
Date: Wed Apr 26 18:00:32 2017
New Revision: 301490

URL: http://llvm.org/viewvc/llvm-project?rev=301490&view=rev
Log:
Remove unnecessary instantiation of StringRef.

SoName's type has changed from StringRef to std::string, so this
code does not make sense anymore.

Modified:
    lld/trunk/ELF/InputFiles.cpp

Modified: lld/trunk/ELF/InputFiles.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/InputFiles.cpp?rev=301490&r1=301489&r2=301490&view=diff
==============================================================================
--- lld/trunk/ELF/InputFiles.cpp (original)
+++ lld/trunk/ELF/InputFiles.cpp Wed Apr 26 18:00:32 2017
@@ -665,7 +665,7 @@ template <class ELFT> void SharedFile<EL
       uint64_t Val = Dyn.getVal();
       if (Val >= this->StringTable.size())
         fatal(toString(this) + ": invalid DT_SONAME entry");
-      SoName = StringRef(this->StringTable.data() + Val);
+      SoName = this->StringTable.data() + Val;
       return;
     }
   }




More information about the llvm-commits mailing list