summaryrefslogtreecommitdiff
path: root/lib/Object/Binary.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2013-06-10 15:27:39 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2013-06-10 15:27:39 +0000
commitf12745f7a7e68c05c89ebd515b9b4faedce37dd0 (patch)
treecddc0ab5c895c526e7a8113f5fb60ee5870fead6 /lib/Object/Binary.cpp
parentb972457783f6f992d8ee2fe392609fd4b0c5cf00 (diff)
downloadllvm-f12745f7a7e68c05c89ebd515b9b4faedce37dd0.tar.gz
llvm-f12745f7a7e68c05c89ebd515b9b4faedce37dd0.tar.bz2
llvm-f12745f7a7e68c05c89ebd515b9b4faedce37dd0.tar.xz
Pass a StringRef to sys::identifyFileType.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183669 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Object/Binary.cpp')
-rw-r--r--lib/Object/Binary.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/Object/Binary.cpp b/lib/Object/Binary.cpp
index 012e328412..5d816e15b5 100644
--- a/lib/Object/Binary.cpp
+++ b/lib/Object/Binary.cpp
@@ -45,8 +45,7 @@ error_code object::createBinary(MemoryBuffer *Source,
OwningPtr<MemoryBuffer> scopedSource(Source);
if (!Source)
return make_error_code(errc::invalid_argument);
- sys::LLVMFileType type = sys::IdentifyFileType(Source->getBufferStart(),
- static_cast<unsigned>(Source->getBufferSize()));
+ sys::LLVMFileType type = sys::identifyFileType(Source->getBuffer());
error_code ec;
switch (type) {
case sys::Archive_FileType: {