[lld] r183670 - Use the StringRef version of identifyFileType.

Rafael Espindola rafael.espindola at gmail.com
Mon Jun 10 08:36:21 PDT 2013


Author: rafael
Date: Mon Jun 10 10:36:21 2013
New Revision: 183670

URL: http://llvm.org/viewvc/llvm-project?rev=183670&view=rev
Log:
Use the StringRef version of identifyFileType.

Modified:
    lld/trunk/lib/ReaderWriter/ELF/Reader.cpp

Modified: lld/trunk/lib/ReaderWriter/ELF/Reader.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/Reader.cpp?rev=183670&r1=183669&r2=183670&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/Reader.cpp (original)
+++ lld/trunk/lib/ReaderWriter/ELF/Reader.cpp Mon Jun 10 10:36:21 2013
@@ -86,8 +86,7 @@ public:
                        std::vector<std::unique_ptr<File> > &result) const {
     using llvm::object::ELFType;
     llvm::sys::LLVMFileType fileType =
-        llvm::sys::IdentifyFileType(mb->getBufferStart(),
-                                    static_cast<unsigned>(mb->getBufferSize()));
+        llvm::sys::identifyFileType(mb->getBuffer());
 
     std::size_t MaxAlignment =
         1ULL << llvm::countTrailingZeros(uintptr_t(mb->getBufferStart()));





More information about the llvm-commits mailing list