Handle bitcode wrappers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53924 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Devang Patel 2008-07-22 18:00:36 +00:00
parent 694caf56f1
commit 54ce536a2d

View File

@ -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 {