Remove Path::hasMagicNumber.
authorRafael Espindola <rafael.espindola@gmail.com>
Wed, 12 Jun 2013 15:04:59 +0000 (15:04 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Wed, 12 Jun 2013 15:04:59 +0000 (15:04 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183838 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Support/PathV1.h
lib/Support/Path.cpp

index 4a4816bd8dc7d23b252c17b8086c05c92b700d63..ceb6e29faf008ccc5c09f710eee53d4e93642b95 100644 (file)
@@ -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.
index 1bae78137b3f3cc106dabf8368167087839dc7c8..d47d23f57b0fca17ec9867c381d3f683e54a5ca8 100644 (file)
@@ -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"