[PATCH] D89216: [dsymutil] Add the ability to run the DWARF verifier on the input

Alexey Lapshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 12 08:59:51 PDT 2020


avl added inline comments.


================
Comment at: llvm/tools/dsymutil/BinaryHolder.cpp:274
+    std::unique_ptr<DWARFContext> DICtx = DWARFContext::create(*Object);
+    if (!DICtx->verify(OS, DumpOpts.noImplicitRecursion()))
+      WithColor::warning() << "input verification failed for "
----------------
I have two suggestions/questions: 1. It would probably be better to do input verification inside DWARFLinker library(DWARFLinker::link()). Then all users of the library will be able to use this functionality. 2. Would it be useful to have failure in verification to be fatal error ?


================
Comment at: llvm/tools/dsymutil/dsymutil.cpp:645
+        static_cast<bool>(Options.Verify & DWARFVerify::Output) &&
+        !Options.LinkOpts.NoOutput;
 
----------------
It makes sense to display message to the user when Options.Verify is ignored because of Options.LinkOpts.NoOutput. Probably verifyOptions() is a good place for it.


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

https://reviews.llvm.org/D89216



More information about the llvm-commits mailing list