projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
694caf5
)
Handle bitcode wrappers.
author
Devang Patel
<dpatel@apple.com>
Tue, 22 Jul 2008 18:00:36 +0000
(18:00 +0000)
committer
Devang Patel
<dpatel@apple.com>
Tue, 22 Jul 2008 18:00:36 +0000
(18:00 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53924
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/System/Path.cpp
patch
|
blob
|
history
diff --git
a/lib/System/Path.cpp
b/lib/System/Path.cpp
index 88479fe5083fff8040daac7c396fe093a35604d9..c5a4b0676ff743d1053643da0a45563868fdd1db 100644
(file)
--- a/
lib/System/Path.cpp
+++ b/
lib/System/Path.cpp
@@
-194,7
+194,10
@@
Path::isBitcodeFile() const {
std::string actualMagic;
if (!getMagicNumber(actualMagic, 4))
return false;
- return actualMagic == "BC\xC0\xDE";
+ LLVMFileType FT =
+ IdentifyFileType(actualMagic.c_str(),
+ static_cast<unsigned>(actualMagic.length()));
+ return FT == Bitcode_FileType;
}
bool Path::hasMagicNumber(const std::string &Magic) const {