[yaml2obj] - Refine handling of the NoHeaders key.
Imagine we have an YAML description for some object and we want to produce 2 outputs: with and without the section header. A natural way to do it would look like: ``` --- !ELF FileHeader: Class: ELFCLASS64 Data: ELFDATA2LSB Type: ET_REL Machine: EM_X86_64 Sections: ... SectionHeaderTable: NoHeaders: [[NOHEADERS]] ``` But currently, we do not distinguish between no `NoHeaders` key case and `NoHeaders == false`. Because of this we can't simply specify `NOHEADERS = false`, as tool starts to complain. With this patch the behavior changed. When we have: ``` SectionHeaderTable: NoHeaders: false ``` it is the same as we have no `SectionHeaderTable` at all. (`NoHeaders` key still can't be used with `Sections/Excluded` keys) Differential revision: https://reviews.llvm.org/D83672
Loading
Please sign in to comment