Support/Path: Deprecate Path::hasMagicNumber and replace all uses with fs::has_magic.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122589 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Support/Path.cpp b/lib/Support/Path.cpp
index c3353fd..3e0ee8d 100644
--- a/lib/Support/Path.cpp
+++ b/lib/Support/Path.cpp
@@ -140,7 +140,11 @@
 
 bool
 Path::isArchive() const {
-  return hasMagicNumber("!<arch>\012");
+  std::string Magic;
+  if (getMagicNumber(Magic, 8))
+    if (IdentifyFileType(Magic.c_str(), Magic.length()) == Archive_FileType)
+      return true;
+  return false;
 }
 
 bool