Teach identify_file_magic to identify PDB files.

llvm-svn: 326924
diff --git a/llvm/lib/BinaryFormat/Magic.cpp b/llvm/lib/BinaryFormat/Magic.cpp
index 42546ea..22ea228 100644
--- a/llvm/lib/BinaryFormat/Magic.cpp
+++ b/llvm/lib/BinaryFormat/Magic.cpp
@@ -181,7 +181,7 @@
       return file_magic::coff_object;
     break;
 
-  case 'M': // Possible MS-DOS stub on Windows PE file
+  case 'M': // Possible MS-DOS stub on Windows PE file or MSF/PDB file.
     if (startswith(Magic, "MZ") && Magic.size() >= 0x3c + 4) {
       uint32_t off = read32le(Magic.data() + 0x3c);
       // PE/COFF file, either EXE or DLL.
@@ -189,6 +189,8 @@
               StringRef(COFF::PEMagic, sizeof(COFF::PEMagic))))
         return file_magic::pecoff_executable;
     }
+    if (Magic.startswith("Microsoft C/C++ MSF 7.00\r\n"))
+      return file_magic::pdb;
     break;
 
   case 0x64: // x86-64 or ARM64 Windows.