1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-02-01 05:01:59 +01:00
Ilya Biryukov 5f75f2e3a7 [YAML] Quote multiline string scalars
Summary:
Otherwise, the YAML parser breaks when trying to read them back in
'key: multiline_string_value' cases.

This patch fixes a problem when serializing structs which contain multi-line strings.
E.g., if we try to serialize  the following struct
```
{ "key1": "first line\nsecond line",
  "key2": "another string" }`
```

Before this patch, we got the YAML output that failed to parse:
```
key1: first line
second line
key2: another string
```

After the patch, we get:
```
key1: 'first line
second line'
key2: another string
```

Reviewers: sammccall

Reviewed By: sammccall

Subscribers: llvm-commits

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

llvm-svn: 333527
2018-05-30 10:40:11 +00:00
..
2018-05-30 09:01:12 +00:00
2018-03-21 17:31:49 +00:00
2018-05-23 15:09:29 +00:00
2018-03-02 22:00:38 +00:00
2017-07-13 16:11:08 +00:00
2018-04-29 00:45:03 +00:00
2018-04-11 23:09:20 +00:00
2018-05-07 05:21:20 +00:00
2018-04-13 11:37:06 +00:00