[PATCH] D33961: encode YAML scalars using double quotes so all values can be expressed

Bob Haarman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 6 14:47:23 PDT 2017


inglorion added a comment.

The vast majority of changes here are updating tests to expect double quotes instead of single quotes. The actual change to the encoder is in llvm/lib/Support/YAMLTraits.cpp.

Alternative considered: Use single quotes when sufficient, and double quotes only if necessary. This would complicate the encoder somewhat, because there is an additional decision that needs to be made, and possibly some work to be re-done (e.g. if a double quote has already been included in the string). On the plus side, it would not require all the tests to be updated. In the end, I decided that I prefer to have a single quoting style used in every case, rather than using a not fully expressive quoting style in the common case and a different quoting style in rarer cases. The test changes only have to be made once, and are mostly mechanical.


https://reviews.llvm.org/D33961





More information about the llvm-commits mailing list