This is an archive of the discontinued LLVM Phabricator instance.

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

Authored by fhahn on Jan 24 2019, 8:02 AM.

Details

Summary

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.