[Symbolize] Parser for log symbolizer markup.
authorDaniel Thornburgh <dthorn@google.com>
Thu, 7 Apr 2022 23:37:11 +0000 (23:37 +0000)
committerDaniel Thornburgh <dthorn@google.com>
Fri, 17 Jun 2022 17:26:24 +0000 (10:26 -0700)
commit2040b6df0a3f355076a363459f0d6c5ef187ac81
treebb390dffef2c9cc28072850b9f159fcffda1522f
parent914b9eec04b5759884ae6ac4995d8293e21efc7e
[Symbolize] Parser for log symbolizer markup.

This adds a parser for the log symbolizer markup format discussed in
https://discourse.llvm.org/t/rfc-log-symbolizer/61282. The parser
operates in a line-by-line fashion with minimal memory requirements.

This doesn't yet include support for multi-line tags or specific parsing
for ANSI X3.64 SGR control sequences, but it can be extended to do so.
The latter can also be relatively easily handled by examining the
resulting text elements.

Reviewed By: peter.smith

Differential Revision: https://reviews.llvm.org/D124686
llvm/include/llvm/DebugInfo/Symbolize/Markup.h [new file with mode: 0644]
llvm/lib/DebugInfo/Symbolize/CMakeLists.txt
llvm/lib/DebugInfo/Symbolize/Markup.cpp [new file with mode: 0644]
llvm/unittests/DebugInfo/CMakeLists.txt
llvm/unittests/DebugInfo/Symbolizer/CMakeLists.txt [new file with mode: 0644]
llvm/unittests/DebugInfo/Symbolizer/MarkupTest.cpp [new file with mode: 0644]