[PATCH] D84233: [lit] Escape ANSI control character in xunit output
Alexander Richardson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 28 14:07:07 PDT 2020
arichardson added inline comments.
================
Comment at: llvm/utils/lit/lit/reports.py:76
+ # Note: In XML 1.1 only \0 is illegal (https://www.w3.org/TR/xml11/#charsets)
+ escape_dict = {chr(c): '\\x' + hex(c)[2:] for c in range(32) if chr(c) not in ('\t', '\n', '\r')}
+ try:
----------------
yln wrote:
> Should this be a global to avoid building the dict on every call to this function?
Yes, this could be called many times so that definitely makes sense.
Will update the patch tomorrow.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D84233/new/
https://reviews.llvm.org/D84233
More information about the llvm-commits
mailing list