From: Rafael Espindola Date: Tue, 11 Jun 2013 15:09:43 +0000 (+0000) Subject: Convert another use of sys::identifyFileType. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=98ee2f93a53b91abe46c7afddb60ed2d8a0ee7bb;p=oota-llvm.git 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 --- diff --git a/lib/Archive/Archive.cpp b/lib/Archive/Archive.cpp index 2b92d0ff827..b909b395270 100644 --- a/lib/Archive/Archive.cpp +++ b/lib/Archive/Archive.cpp @@ -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; }