llvm/lib/ObjectYAML
Francis Visoiu Mistrih 65ad22d969 [YAML] Add support for non-printable characters
LLVM IR function names which disable mangling start with '\01'
(https://www.llvm.org/docs/LangRef.html#identifiers).

When an identifier like "\01@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 escaped non-printable characters
between double quotes if needed.

Should also fix PR31743.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@320996 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-18 17:38:03 +00:00
..
CMakeLists.txt Update obj2yaml and yaml2obj for .debug$H section. 2017-12-06 18:58:48 +00:00
CodeViewYAMLDebugSections.cpp [YAML] Add support for non-printable characters 2017-12-18 17:38:03 +00:00
CodeViewYAMLSymbols.cpp [YAML] Add support for non-printable characters 2017-12-18 17:38:03 +00:00
CodeViewYAMLTypeHashing.cpp [CodeView] Teach clang to emit the .debug$H COFF section. 2017-12-13 22:33:58 +00:00
CodeViewYAMLTypes.cpp [YAML] Add support for non-printable characters 2017-12-18 17:38:03 +00:00
COFFYAML.cpp Update obj2yaml and yaml2obj for .debug$H section. 2017-12-06 18:58:48 +00:00
DWARFEmitter.cpp Move helper classes into anonymous namespaces. 2017-08-20 13:03:48 +00:00
DWARFVisitor.cpp Move helper classes into anonymous namespaces. 2017-08-20 13:03:48 +00:00
DWARFVisitor.h Move Object format code to lib/BinaryFormat. 2017-06-07 03:48:56 +00:00
DWARFYAML.cpp [ObjectYAML] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-07-01 01:35:55 +00:00
ELFYAML.cpp Add ELF dynamic symbol support to yaml2obj/obj2yaml 2017-11-16 18:10:15 +00:00
LLVMBuild.txt [CodeView] Move CodeView YAML code to ObjectYAML. 2017-05-30 21:53:05 +00:00
MachOYAML.cpp [YAML] Add support for non-printable characters 2017-12-18 17:38:03 +00:00
ObjectYAML.cpp [ObjectYAML] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-07-01 01:35:55 +00:00
WasmYAML.cpp [WebAssembly] Add support for init functions linking metadata 2017-12-14 21:10:03 +00:00
YAML.cpp [ObjectYAML] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-07-01 01:35:55 +00:00