[llvm] r183838 - Remove Path::hasMagicNumber.

Rafael Espindola rafael.espindola at gmail.com
Wed Jun 12 08:04:59 PDT 2013


Author: rafael
Date: Wed Jun 12 10:04:59 2013
New Revision: 183838

URL: http://llvm.org/viewvc/llvm-project?rev=183838&view=rev
Log:
Remove Path::hasMagicNumber.

Modified:
    llvm/trunk/include/llvm/Support/PathV1.h
    llvm/trunk/lib/Support/Path.cpp

Modified: llvm/trunk/include/llvm/Support/PathV1.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/PathV1.h?rev=183838&r1=183837&r2=183838&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/PathV1.h (original)
+++ llvm/trunk/include/llvm/Support/PathV1.h Wed Jun 12 10:04:59 2013
@@ -219,15 +219,6 @@ namespace sys {
     /// @name Disk Accessors
     /// @{
     public:
-      /// This function opens the file associated with the path name provided by
-      /// the Path object and reads its magic number. If the magic number at the
-      /// start of the file matches \p magic, true is returned. In all other
-      /// cases (file not found, file not accessible, etc.) it returns false.
-      /// @returns true if the magic number of the file matches \p magic.
-      /// @brief Determine if file has a specific magic number
-      LLVM_ATTRIBUTE_DEPRECATED(bool hasMagicNumber(StringRef magic) const,
-        LLVM_PATH_DEPRECATED_MSG(fs::has_magic));
-
       /// This function retrieves the first \p len bytes of the file associated
       /// with \p this. These bytes are returned as the "magic number" in the
       /// \p Magic parameter.

Modified: llvm/trunk/lib/Support/Path.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Path.cpp?rev=183838&r1=183837&r2=183838&view=diff
==============================================================================
--- llvm/trunk/lib/Support/Path.cpp (original)
+++ llvm/trunk/lib/Support/Path.cpp Wed Jun 12 10:04:59 2013
@@ -85,13 +85,6 @@ Path::isBitcodeFile() const {
   return type == fs::file_magic::bitcode;
 }
 
-bool Path::hasMagicNumber(StringRef Magic) const {
-  std::string actualMagic;
-  if (getMagicNumber(actualMagic, static_cast<unsigned>(Magic.size())))
-    return Magic == actualMagic;
-  return false;
-}
-
 // Include the truly platform-specific parts of this class.
 #if defined(LLVM_ON_UNIX)
 #include "Unix/Path.inc"





More information about the llvm-commits mailing list