[PATCH] D64566: [YAMLIO] Remove trailing spaces when outputting maps

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 11 06:54:13 PDT 2019


MaskRay created this revision.
MaskRay added reviewers: grimar, jhenderson, pcc.
Herald added subscribers: llvm-commits, kristina.
Herald added a project: LLVM.

llvm::yaml::Output::paddedKey unconditionally outputs spaces, which
are superfluous if the value to be dumped is a sequence or map.
Change `bool NeedsNewLine` to `StringRef Padding` so that it can be
overridden to `\n` if the value is a sequence or map.


Repository:
  rL LLVM

https://reviews.llvm.org/D64566

Files:
  include/llvm/Support/YAMLTraits.h
  lib/Support/YAMLTraits.cpp
  unittests/Support/YAMLIOTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D64566.209210.patch
Type: text/x-patch
Size: 3158 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190711/c476a3b5/attachment.bin>


More information about the llvm-commits mailing list