mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-25 21:18:19 +00:00
Support/FileSystem: Add file_magic and move a vew clients over to it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146523 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -182,11 +182,11 @@ Archive::addFileBefore(const sys::Path& filePath, iterator where,
|
||||
if (hasSlash || filePath.str().length() > 15)
|
||||
flags |= ArchiveMember::HasLongFilenameFlag;
|
||||
|
||||
sys::LLVMFileType type;
|
||||
sys::fs::file_magic type;
|
||||
if (sys::fs::identify_magic(mbr->path.str(), type))
|
||||
type = sys::Unknown_FileType;
|
||||
type = sys::fs::file_magic::unknown;
|
||||
switch (type) {
|
||||
case sys::Bitcode_FileType:
|
||||
case sys::fs::file_magic::bitcode:
|
||||
flags |= ArchiveMember::BitcodeFlag;
|
||||
break;
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user