Remove Path::isObjectFile.
authorRafael Espindola <rafael.espindola@gmail.com>
Wed, 19 Jun 2013 14:25:38 +0000 (14:25 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Wed, 19 Jun 2013 14:25:38 +0000 (14:25 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184305 91177308-0d34-0410-b5e6-96231b3b80d8

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

index fe2dd9aff327398fd8490423e315d6c33774e1fc..f4c0ef88cb1970bb80354c994bd3fd642b3a1e99 100644 (file)
@@ -233,17 +233,6 @@ namespace sys {
       /// @brief Determine if the path references a dynamic library.
       bool isDynamicLibrary() const;
 
-      /// This function determines if the path name in the object references a
-      /// native object file by looking at it's magic number. The term object
-      /// file is defined as "an organized collection of separate, named
-      /// sequences of binary data." This covers the obvious file formats such
-      /// as COFF and ELF, but it also includes llvm ir bitcode, archives,
-      /// libraries, etc...
-      /// @returns true if the file starts with the magic number for an object
-      /// file.
-      /// @brief Determine if the path references an object file.
-      bool isObjectFile() const;
-
       /// This function determines if the path name references an existing file
       /// or directory in the file system.
       /// @returns true if the pathname references an existing file or
index 7ddaf1e89edbab9d3446425867e7c7720d29cb6a..8e229ab88a382311cb44355dd8a3a2e40b4a2cbc 100644 (file)
@@ -61,14 +61,6 @@ Path::isDynamicLibrary() const {
   }
 }
 
-bool
-Path::isObjectFile() const {
-  fs::file_magic type;
-  if (fs::identify_magic(str(), type) || type == fs::file_magic::unknown)
-    return false;
-  return true;
-}
-
 void
 Path::appendSuffix(StringRef suffix) {
   if (!suffix.empty()) {