summaryrefslogtreecommitdiff
path: root/lib/System/Path.cpp
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2008-07-22 18:00:36 +0000
committerDevang Patel <dpatel@apple.com>2008-07-22 18:00:36 +0000
commit54ce536a2d4400e6921bf29c879046900893aeae (patch)
tree3680678ebc9bfabd9d7499bff3fa1fe85d971118 /lib/System/Path.cpp
parent694caf56f15bec971d493069a1613a8f992f510a (diff)
downloadllvm-54ce536a2d4400e6921bf29c879046900893aeae.tar.gz
llvm-54ce536a2d4400e6921bf29c879046900893aeae.tar.bz2
llvm-54ce536a2d4400e6921bf29c879046900893aeae.tar.xz
Handle bitcode wrappers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53924 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/System/Path.cpp')
-rw-r--r--lib/System/Path.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/System/Path.cpp b/lib/System/Path.cpp
index 88479fe508..c5a4b0676f 100644
--- 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 {