diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2013-06-11 15:09:43 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2013-06-11 15:09:43 +0000 |
commit | 98ee2f93a53b91abe46c7afddb60ed2d8a0ee7bb (patch) | |
tree | 41028057a8e1a103078ff5401168e1fd2adb7968 /lib | |
parent | de6fe4d604e561a58854f09a3d985ea59e4db973 (diff) | |
download | external_llvm-98ee2f93a53b91abe46c7afddb60ed2d8a0ee7bb.zip external_llvm-98ee2f93a53b91abe46c7afddb60ed2d8a0ee7bb.tar.gz external_llvm-98ee2f93a53b91abe46c7afddb60ed2d8a0ee7bb.tar.bz2 |
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
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Archive/Archive.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/lib/Archive/Archive.cpp b/lib/Archive/Archive.cpp index 2b92d0ff..b909b39 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; } |