Pass a StringRef to sys::identifyFileType.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183669 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola
2013-06-10 15:27:39 +00:00
parent b972457783
commit f12745f7a7
9 changed files with 15 additions and 18 deletions

View File

@@ -40,8 +40,7 @@ section_iterator ObjectFile::getRelocatedSection(DataRefImpl Sec) const {
ObjectFile *ObjectFile::createObjectFile(MemoryBuffer *Object) {
if (!Object || Object->getBufferSize() < 64)
return 0;
sys::LLVMFileType type = sys::IdentifyFileType(Object->getBufferStart(),
static_cast<unsigned>(Object->getBufferSize()));
sys::LLVMFileType type = sys::identifyFileType(Object->getBuffer());
switch (type) {
case sys::Unknown_FileType:
return 0;