[PATCH] D41290: [YAML] Add support for non-printable characters

Francis Visoiu Mistrih via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 15 07:05:26 PST 2017


thegameg created this revision.
thegameg added reviewers: MatzeB, JDevlieghere, aprantl, arphaman, zturner.

LLVM IR function names which disable mangling start with '\01' (https://www.llvm.org/docs/LangRef.html#identifiers).

When an identifier like "\01 at abc@" gets dumped to MIR, it is quoted, but only with single quotes.

http://www.yaml.org/spec/1.2/spec.html#id2770814:

"The allowed character range explicitly excludes the C0 control block allowed), the surrogate block #xD800-#xDFFF, #xFFFE, and #xFFFF."

http://www.yaml.org/spec/1.2/spec.html#id2776092:

"All non-printable characters must be escaped. [...] Note that escape sequences are only interpreted in double-quoted scalars."

This patch adds support for printing non-printable characters between double quotes if needed.


https://reviews.llvm.org/D41290

Files:
  docs/YamlIO.rst
  include/llvm/CodeGen/MIRYamlMapping.h
  include/llvm/ObjectYAML/CodeViewYAMLTypeHashing.h
  include/llvm/ObjectYAML/CodeViewYAMLTypes.h
  include/llvm/ObjectYAML/MachOYAML.h
  include/llvm/ObjectYAML/YAML.h
  include/llvm/Support/YAMLTraits.h
  lib/ObjectYAML/CodeViewYAMLDebugSections.cpp
  lib/ObjectYAML/CodeViewYAMLSymbols.cpp
  lib/ObjectYAML/CodeViewYAMLTypes.cpp
  lib/ObjectYAML/MachOYAML.cpp
  lib/Support/Statistic.cpp
  lib/Support/Timer.cpp
  lib/Support/YAMLTraits.cpp
  tools/dsymutil/DebugMap.h
  unittests/Support/YAMLIOTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D41290.127122.patch
Type: text/x-patch
Size: 23506 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171215/be8dcd34/attachment.bin>


More information about the llvm-commits mailing list