Convert another use of sys::identifyFileType.

No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183746 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola 2013-06-11 15:09:43 +00:00
parent de6fe4d604
commit 98ee2f93a5

View File

@ -129,14 +129,12 @@ bool ArchiveMember::replaceWith(const sys::Path& newFile, std::string* ErrMsg) {
}
// Determine what kind of file it is.
switch (sys::identifyFileType(StringRef(signature, 4))) {
case sys::Bitcode_FileType:
flags |= BitcodeFlag;
break;
default:
flags &= ~BitcodeFlag;
break;
}
if (sys::fs::identify_magic(StringRef(signature, 4)) ==
sys::fs::file_magic::bitcode)
flags |= BitcodeFlag;
else
flags &= ~BitcodeFlag;
return false;
}