mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-01 15:17:25 +00:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user