[llvm] [readtapi] Add Merge functionality (PR #72656)

Cyndy Ishida via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 17 09:05:41 PST 2023


================
@@ -138,8 +155,22 @@ int main(int Argc, char **Argv) {
     }
   }
 
+  if (Args.hasArg(OPT_compact))
+    Ctx.Compact = true;
+
+  if (opt::Arg *A = Args.getLastArg(OPT_filetype_EQ)) {
+    Ctx.WriteFT = TextAPIWriter::parseFileType(A->getValue());
+    if (Ctx.WriteFT < FileType::TBD_V3 || Ctx.WriteFT == FileType::Invalid) {
+      llvm::errs() << "error: unsupported filetype '" << A->getValue() << "'\n";
+      return EXIT_FAILURE;
+    }
+  }
+
   if (Args.hasArg(OPT_compare))
----------------
cyndyishida wrote:

I'll change this to work like lipo. 

https://github.com/llvm/llvm-project/pull/72656


More information about the llvm-commits mailing list