forked from OSchip/llvm-project
Convert another use of sys::identifyFileType.
No functionality change. llvm-svn: 183746
This commit is contained in:
parent
110801addc
commit
d2d22eef6e
|
@ -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