From 1dc43065a7b02c6e52e2df8777bb231292c0ce04 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Mon, 10 Jun 2013 15:27:39 +0000 Subject: Pass a StringRef to sys::identifyFileType. llvm-svn: 183669 --- llvm/lib/Object/Binary.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'llvm/lib/Object/Binary.cpp') diff --git a/llvm/lib/Object/Binary.cpp b/llvm/lib/Object/Binary.cpp index 012e3284127..5d816e15b53 100644 --- a/llvm/lib/Object/Binary.cpp +++ b/llvm/lib/Object/Binary.cpp @@ -45,8 +45,7 @@ error_code object::createBinary(MemoryBuffer *Source, OwningPtr scopedSource(Source); if (!Source) return make_error_code(errc::invalid_argument); - sys::LLVMFileType type = sys::IdentifyFileType(Source->getBufferStart(), - static_cast(Source->getBufferSize())); + sys::LLVMFileType type = sys::identifyFileType(Source->getBuffer()); error_code ec; switch (type) { case sys::Archive_FileType: { -- cgit v1.2.3