projects
/
oota-llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Inline Path::isBitcodeFile into only use and remove it.
[oota-llvm.git]
/
tools
/
lto
/
LTOModule.cpp
diff --git
a/tools/lto/LTOModule.cpp
b/tools/lto/LTOModule.cpp
index 807d860b79cfaab2541f5819e280675de93ea3df..263e8b346e13fe04f5e417f442e937d45d681e6f 100644
(file)
--- a/
tools/lto/LTOModule.cpp
+++ b/
tools/lto/LTOModule.cpp
@@
-32,7
+32,6
@@
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/Path.h"
-#include "llvm/Support/PathV1.h"
#include "llvm/Support/SourceMgr.h"
#include "llvm/Support/TargetRegistry.h"
#include "llvm/Support/TargetSelect.h"
#include "llvm/Support/SourceMgr.h"
#include "llvm/Support/TargetRegistry.h"
#include "llvm/Support/TargetSelect.h"
@@
-170,7
+169,10
@@
bool LTOModule::isBitcodeFile(const void *mem, size_t length) {
}
bool LTOModule::isBitcodeFile(const char *path) {
}
bool LTOModule::isBitcodeFile(const char *path) {
- return llvm::sys::Path(path).isBitcodeFile();
+ sys::fs::file_magic type;
+ if (sys::fs::identify_magic(path, type))
+ return false;
+ return type == sys::fs::file_magic::bitcode;
}
/// isBitcodeFileForTarget - Returns 'true' if the file (or memory contents) is
}
/// isBitcodeFileForTarget - Returns 'true' if the file (or memory contents) is