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:
Michael J. Spencer
2011-12-13 23:17:12 +00:00
parent b92cb30cf5
commit 5b08230930
4 changed files with 172 additions and 19 deletions
+3 -3
View File
@@ -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: