HomePhabricator

[DiagnosticInfo] Add support for preserving newlines in remark arguments.

Description

[DiagnosticInfo] Add support for preserving newlines in remark arguments.

This patch adds a new type StringBlockVal which can be used to emit a
YAML block scalar, which preserves newlines in a multiline string. It
also updates MappingTraits<DiagnosticInfoOptimizationBase::Argument> to
use it for argument values with more than a single newline.

This is helpful for remarks that want to display more in-depth
information in a more structured way.

Reviewers: thegameg, anemet

Reviewed By: anemet

Subscribers: hfinkel, hiraditya, llvm-commits

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

Details

Committed
fhahnJan 25 2019, 8:59 AM
Reviewer
anemet
Differential Revision
D57159: [DiagnosticInfo] Add support for preserving newlines in remark arguments.
Parents
rL352215: Revert abstract formating for LLVM-Perf@CGO
Branches
Unknown
Tags
Unknown