[PATCH] D87008: [DebugInfo] Fix methods of AsmPrinter to emit values corresponding to the DWARF format (1/19).

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 2 09:53:47 PDT 2020


dblaikie added a comment.

It's a fair bit of unit test infrastructure - what's the tradeoff between API/unit testing versus functional testing with the command line tools as most of the testing is done? (FileChecking the resulting assembly)



================
Comment at: llvm/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp:157
     if (MAI->needsDwarfSectionOffsetDirective()) {
+      assert(!isDwarf64() &&
+             "emitting DWARF64 is not implemented for COFF targets");
----------------
If this is reachable with the right flags, but unimplemented and more a "user error" than something that needs to be handled gracefully, it might be appropriate to use report_fatal_error rather than assert.

If this is unreachable(due to prior data validation) from the command line of user-facing tools, then the assert is OK.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D87008



More information about the llvm-commits mailing list