[PATCH] D66149: [BinaryFormat] Teach identify_magic about Tapi files.

Steven Wu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 13 13:38:14 PDT 2019


steven_wu accepted this revision.
steven_wu added a comment.
This revision is now accepted and ready to land.

few small comments. Otherwise, LGTM.



================
Comment at: llvm/include/llvm/BinaryFormat/Magic.h:52
     pdb,                 ///< Windows PDB debug info file
+    tapi_file,           ///< Text-based Dynamic Library Stub file
   };
----------------
tapi_file is not very clear what it actually refer to. Maybe something like tapi_dylib_stub (I am not very happy with this as well)?


================
Comment at: llvm/lib/BinaryFormat/Magic.cpp:214
+  case 0x2d: // YAML '-'
+    if (startswith(Magic, "---\narchs:") || startswith(Magic, "--- !tapi"))
+      return file_magic::tapi_file;
----------------
maybe reverse the order of the condition?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D66149/new/

https://reviews.llvm.org/D66149





More information about the llvm-commits mailing list