summaryrefslogtreecommitdiffstats
path: root/llvm/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
commit1dc43065a7b02c6e52e2df8777bb231292c0ce04 (patch)
treeb8dc1d383aa44438927132b63bfe62871da9caf6 /llvm/lib/Object/Binary.cpp
parentaecb66ec331bf1b1fc29dde9ca6ee09560039530 (diff)
downloadbcm5719-llvm-1dc43065a7b02c6e52e2df8777bb231292c0ce04.tar.gz
bcm5719-llvm-1dc43065a7b02c6e52e2df8777bb231292c0ce04.zip
Pass a StringRef to sys::identifyFileType.
llvm-svn: 183669
Diffstat (limited to 'llvm/lib/Object/Binary.cpp')
-rw-r--r--llvm/lib/Object/Binary.cpp3
1 files changed, 1 insertions, 2 deletions
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<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: {
OpenPOWER on IntegriCloud