Convert another use of sys::identifyFileType.
authorRafael Espindola <rafael.espindola@gmail.com>
Tue, 11 Jun 2013 18:05:26 +0000 (18:05 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Tue, 11 Jun 2013 18:05:26 +0000 (18:05 +0000)
No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183759 91177308-0d34-0410-b5e6-96231b3b80d8

tools/lto/LTOModule.cpp

index 5fad01bb51192e5e449b40e8679f48f269bd4261..91fcb2ee3d021e03bf73f0df740978d04c7af3c6 100644 (file)
@@ -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) {