diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2013-06-11 18:05:26 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2013-06-11 18:05:26 +0000 |
commit | 6c21feb0b7f6f4c9b92878cf22d59aed4ebe226f (patch) | |
tree | 90f0177b0cfa5e1f5f3d5f3b4a8397ae4f4bb092 /tools | |
parent | 3ecfcc20c15f9d430b2938416b63d7bbd4d45dec (diff) | |
download | external_llvm-6c21feb0b7f6f4c9b92878cf22d59aed4ebe226f.zip external_llvm-6c21feb0b7f6f4c9b92878cf22d59aed4ebe226f.tar.gz external_llvm-6c21feb0b7f6f4c9b92878cf22d59aed4ebe226f.tar.bz2 |
Convert another use of sys::identifyFileType.
No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183759 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools')
-rw-r--r-- | tools/lto/LTOModule.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/lto/LTOModule.cpp b/tools/lto/LTOModule.cpp index 5fad01b..91fcb2e 100644 --- a/tools/lto/LTOModule.cpp +++ b/tools/lto/LTOModule.cpp @@ -29,6 +29,7 @@ #include "llvm/MC/SubtargetFeature.h" #include "llvm/Support/CommandLine.h" #include "llvm/Support/Host.h" +#include "llvm/Support/FileSystem.h" #include "llvm/Support/MemoryBuffer.h" #include "llvm/Support/Path.h" #include "llvm/Support/SourceMgr.h" @@ -163,8 +164,8 @@ LTOModule::LTOModule(llvm::Module *m, llvm::TargetMachine *t) /// isBitcodeFile - Returns 'true' if the file (or memory contents) is LLVM /// bitcode. bool LTOModule::isBitcodeFile(const void *mem, size_t length) { - return llvm::sys::identifyFileType(StringRef((const char*)mem, length)) - == llvm::sys::Bitcode_FileType; + return sys::fs::identify_magic(StringRef((const char *)mem, length)) == + sys::fs::file_magic::bitcode; } bool LTOModule::isBitcodeFile(const char *path) { |