This is an archive of the discontinued LLVM Phabricator instance.

[yaml2obj] - Add a Size field for StackSizesSection.
ClosedPublic

Authored by grimar on Sep 24 2019, 5:14 AM.

Details

Summary

It is a follow-up requested in the review comment
for D67757. Allows to use Content + Size or just Size
when describing .stack_sizes sections in YAML document.

Diff Detail

Event Timeline

MaskRay added inline comments.Sep 24 2019, 5:29 AM
lib/ObjectYAML/ELFYAML.cpp
1181 ↗(On Diff #221514)

one of Content, Entries and Size must be specified

test/tools/yaml2obj/elf-stack-sizes.yaml
275 ↗(On Diff #221514)

to create

jhenderson added inline comments.Sep 24 2019, 6:05 AM
test/tools/yaml2obj/elf-stack-sizes.yaml
277 ↗(On Diff #221514)

This case tests Size > Content. What about Size < Content? (I think it should be an error)

grimar updated this revision to Diff 221710.Sep 25 2019, 3:48 AM
grimar marked 4 inline comments as done.
grimar edited the summary of this revision. (Show Details)
  • Addressed review comments.
test/tools/yaml2obj/elf-stack-sizes.yaml
277 ↗(On Diff #221514)

Fixed, added a test case.

This revision is now accepted and ready to land.Sep 25 2019, 3:56 AM
MaskRay accepted this revision.Sep 25 2019, 4:12 AM
MaskRay added inline comments.
test/tools/yaml2obj/elf-stack-sizes.yaml
215 ↗(On Diff #221710)

either ... or -> one of

grimar marked an inline comment as done.Sep 25 2019, 4:22 AM
grimar added inline comments.
test/tools/yaml2obj/elf-stack-sizes.yaml
215 ↗(On Diff #221710)

I do not mid to rephrase and will do it before commit, but do you mean it is not grammarly correct?
(I think it is commonly used: https://www.grammarphobia.com/blog/2017/08/either-neither.html)

MaskRay added inline comments.Sep 25 2019, 4:30 AM
test/tools/yaml2obj/elf-stack-sizes.yaml
215 ↗(On Diff #221710)

Today i learned. Exactly, I was under the impression "that “either”/”neither” constructions are used with only two alternatives"... LG!

This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptSep 25 2019, 4:42 AM
Herald added a subscriber: hiraditya. · View Herald Transcript