[all-commits] [llvm/llvm-project] 79b44a: [YAMLTraits] Fix mapping <none> value that followe...

Xing GUO via All-commits all-commits at lists.llvm.org
Tue Aug 4 03:37:40 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 79b44a4d470041acf202027054ba86e935d86aa1
      https://github.com/llvm/llvm-project/commit/79b44a4d470041acf202027054ba86e935d86aa1
  Author: Xing GUO <higuoxing at gmail.com>
  Date:   2020-08-04 (Tue, 04 Aug 2020)

  Changed paths:
    M llvm/include/llvm/Support/YAMLTraits.h
    M llvm/test/tools/yaml2obj/ELF/none-value.yaml

  Log Message:
  -----------
  [YAMLTraits] Fix mapping <none> value that followed by comments.

When mapping an optional value, if the value is <none> and followed
by comments, there will be a parsing error. This patch helps fix this
issue.

e.g.,

When mapping the following YAML,

```
Sections:
  - Name:  blah
    Type:  SHT_foo
    Flags: [[FLAGS=<none>]] ## some comments.
```

the raw value of `ScalarNode` is "<none> " rather than "<none>". We need
to remove the spaces.

Differential Revision: https://reviews.llvm.org/D85180




More information about the All-commits mailing list