[PATCH] D81220: [DWARFYAML][debug_ranges] Make the "Offset" field optional.

Xing GUO via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 5 01:36:28 PDT 2020


Higuoxing marked an inline comment as done.
Higuoxing added inline comments.


================
Comment at: llvm/lib/ObjectYAML/DWARFEmitter.cpp:122-124
+      assert(*DebugRanges.Offset >= CurrOffset &&
+             "Offset should be greater than or equal to the bytes that we have "
+             "written");
----------------
jhenderson wrote:
> I don't think this wants to be an assert - it should be an error, right? If you specify a lower offset than the current position (e.g. 0 for the second set), you want an error since you can't place it there.
Yes, I think it should be an error as well. Currently, DWARFYAML doesn't support error handling. If we change one `void EmitXXXSection()` to `Error EmitXXXSection()`, we should change them all. Can I do it in a follow-up patch?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D81220





More information about the llvm-commits mailing list