mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-27 00:21:03 +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:
@@ -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: {
|
||||
|
Reference in New Issue
Block a user