This was previously being silently dropped by obj2yaml and caused
parsing errors with yaml2obj.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
FWIW, the fact we're dropping flags we don't know about it a little annoying.
We should error instead.
To clarify, it's dropped silently by obj2yaml, but yaml2obj complains if it doesn't recognize a flag value. I'll update the commit message before committing.
I was contemplating adding a test for obj2yaml as well to ensure its output didn't drop SHF_COMPRESSED, but I figured it would be slightly redundant, since obj2yaml and yaml2obj use the same flags handling logic.
Thanks for clarifying.
I was contemplating adding a test for obj2yaml as well to ensure its output didn't drop SHF_COMPRESSED, but I figured it would be slightly redundant, since obj2yaml and yaml2obj use the same flags handling logic.
Probably it doesn't matter.
test/tools/yaml2obj/shf-compressed.yaml | ||
---|---|---|
1–2 ↗ | (On Diff #117467) | if you really want to make this test slightly fancier, you can test that the outputs of yaml2obj and obj2yaml are the same up to isomorphism (for some very relaxed definition of isomorphism, as you're not guaranteed that converting and then converting back will give you the original object for a series of reason). |
Argh, totally didn't mean to remove the accept.
test/tools/yaml2obj/shf-compressed.yaml | ||
---|---|---|
1–2 ↗ | (On Diff #117467) | I didn't go that fancy, but I did add verification that the obj2yaml output includes the flag. |