mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-06 20:10:26 +00:00
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:
parent
de6fe4d604
commit
98ee2f93a5
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user