[PATCH] D84526: [yaml2obj] - Add a support for "<none>" value for all optional fields.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 27 23:43:51 PDT 2020


grimar added a comment.

In D84526#2176664 <https://reviews.llvm.org/D84526#2176664>, @MaskRay wrote:

> What about the alternative syntax mentioned in https://reviews.llvm.org/D84398#2169623 ?



>> Other syntactic forms include ShOffset?: [[TEST]].

IMO "Offset: [[MACRO=<none>]]" looks/works better. Since we have default values, e.g. `[[MACRO=0x5]]`, the `<none>` looks consistent.
Seems "?:" is only meaningful with marcos, so personally I'd try to avoid introducing one more syntax for them.

>> At the worst, we can use [[TEST=ShOffset: 0]]

It is seems to be not an option, because we might do not know the default ShOffset. The idea of the change is to avoid specifying it explicitly.
(e.g. you often do not know the value of ShName, for example, so `ShName=<none>` - works, but any other default value else - usually doesn't).


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

https://reviews.llvm.org/D84526



More information about the llvm-commits mailing list