[llvm-commits] [llvm] r53924 - /llvm/trunk/lib/System/Path.cpp
Devang Patel
dpatel at apple.com
Tue Jul 22 11:00:36 PDT 2008
Author: dpatel
Date: Tue Jul 22 13:00:36 2008
New Revision: 53924
URL: http://llvm.org/viewvc/llvm-project?rev=53924&view=rev
Log:
Handle bitcode wrappers.
Modified:
llvm/trunk/lib/System/Path.cpp
Modified: llvm/trunk/lib/System/Path.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/System/Path.cpp?rev=53924&r1=53923&r2=53924&view=diff
==============================================================================
--- llvm/trunk/lib/System/Path.cpp (original)
+++ llvm/trunk/lib/System/Path.cpp Tue Jul 22 13:00:36 2008
@@ -194,7 +194,10 @@
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 {
More information about the llvm-commits
mailing list