diff options
| author | Fangrui Song <maskray@google.com> | 2019-07-12 04:51:31 +0000 |
|---|---|---|
| committer | Fangrui Song <maskray@google.com> | 2019-07-12 04:51:31 +0000 |
| commit | 27ed1c5bb80c8da317cd80bdd50cb22189d1c6fb (patch) | |
| tree | fa9f57c557e4bbd583dff780ec9a1a5a3e00ea66 /llvm/test/CodeGen/Mips/tailcall/tailcall.ll | |
| parent | 320d6795b29efee3f5d47e2c88dcd74d621e482f (diff) | |
| download | bcm5719-llvm-27ed1c5bb80c8da317cd80bdd50cb22189d1c6fb.tar.gz bcm5719-llvm-27ed1c5bb80c8da317cd80bdd50cb22189d1c6fb.zip | |
[YAMLIO] Remove trailing spaces when outputting maps
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.
An empty map/sequence is special. It is printed as `{}` or `[]` without
a newline, while a non-empty map/sequence follows a newline. To handle
this distinction, add another variable `PaddingBeforeContainer` and does
the special handling in endMapping/endSequence.
Reviewed By: grimar, jhenderson
Differential Revision: https://reviews.llvm.org/D64566
llvm-svn: 365869
Diffstat (limited to 'llvm/test/CodeGen/Mips/tailcall/tailcall.ll')
0 files changed, 0 insertions, 0 deletions

