[llvm-commits] [llvm] r54494 - /llvm/tags/Apple/llvmCore-2062/lib/System/Path.cpp

Bill Wendling isanbard at gmail.com
Thu Aug 7 16:15:42 PDT 2008


Author: void
Date: Thu Aug  7 18:15:41 2008
New Revision: 54494

URL: http://llvm.org/viewvc/llvm-project?rev=54494&view=rev
Log:
Pull r53924 into llvmCore-2062:

Handle llvm wrappers.

Modified:
    llvm/tags/Apple/llvmCore-2062/lib/System/Path.cpp

Modified: llvm/tags/Apple/llvmCore-2062/lib/System/Path.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/tags/Apple/llvmCore-2062/lib/System/Path.cpp?rev=54494&r1=54493&r2=54494&view=diff

==============================================================================
--- llvm/tags/Apple/llvmCore-2062/lib/System/Path.cpp (original)
+++ llvm/tags/Apple/llvmCore-2062/lib/System/Path.cpp Thu Aug  7 18:15:41 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