summaryrefslogtreecommitdiffstats
path: root/docs/YamlIO.rst
Commit message (Collapse)AuthorAgeFilesLines
* [YAML] Add support for non-printable charactersFrancis Visoiu Mistrih2017-12-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* fix some typos in the docSylvestre Ledru2017-01-141-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292014 91177308-0d34-0410-b5e6-96231b3b80d8
* [docs] Fix typo in YamlIO.rstVedant Kumar2016-02-041-2/+3
| | | | | | Patch by Mario Lang! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259825 91177308-0d34-0410-b5e6-96231b3b80d8
* [YAMLIO] Make line-wrapping configurable and test it.Frederic Riss2015-05-291-3/+11
| | | | | | | | | | | | | | | | Summary: We would wrap flow mappings and sequences when they go over a hardcoded 70 characters limit. Make the wrapping column configurable (and default to 70 co the change should be NFC for current users). Passing 0 allows to completely suppress the wrapping which makes it easier to handle in tools like FileCheck. Reviewers: bogner Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D10109 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238584 91177308-0d34-0410-b5e6-96231b3b80d8
* YAML: Add support for literal block scalar I/O.Alex Lorenz2015-05-141-0/+50
| | | | | | | | | | | | | | This commit gives the users of the YAML Traits I/O library the ability to serialize scalars using the YAML literal block scalar notation by allowing them to implement a specialization of the `BlockScalarTraits` struct for their custom types. Reviewers: Duncan P. N. Exon Smith Differential Revision: http://reviews.llvm.org/D9613 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237404 91177308-0d34-0410-b5e6-96231b3b80d8
* YAML: Add an optional 'flow' field to the mapping trait to allow flow ↵Alex Lorenz2015-05-041-0/+25
| | | | | | | | | | | | | | mapping output. This patch adds an optional 'flow' field to the MappingTrait class so that yaml IO will be able to output flow mappings. Reviewers: Justin Bogner Differential Revision: http://reviews.llvm.org/D9450 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236456 91177308-0d34-0410-b5e6-96231b3b80d8
* Update YamlIO documentation for the ScalarTraits class.Alex Lorenz2015-05-011-2/+2
| | | | | | | | | | This patch adds the missing context parameter to the input and output methods in ScalarTraits. Differential Revision: http://reviews.llvm.org/D9173 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236328 91177308-0d34-0410-b5e6-96231b3b80d8
* Correct 'teh' and other typos / repeated words.Ed Maste2015-04-141-2/+2
| | | | | | | | | Patch by Eitan Adler. Differential Revision: http://reviews.llvm.org/D8514 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234939 91177308-0d34-0410-b5e6-96231b3b80d8
* [YAML] Add an optional argument `EnumMask` to the `yaml::IO::bitSetCase()`.Simon Atanasyan2014-05-231-0/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some bit-set fields used in ELF file headers in fact contain two parts. The first one is a regular bit-field. The second one is an enumeraion. For example ELF header `e_flags` for MIPS target might contain the following values: Bit-set values: EF_MIPS_NOREORDER = 0x00000001 EF_MIPS_PIC = 0x00000002 EF_MIPS_CPIC = 0x00000004 EF_MIPS_ABI2 = 0x00000020 Enumeration: EF_MIPS_ARCH_32 = 0x50000000 EF_MIPS_ARCH_64 = 0x60000000 EF_MIPS_ARCH_32R2 = 0x70000000 EF_MIPS_ARCH_64R2 = 0x80000000 For printing bit-sets we use the `yaml::IO::bitSetCase()`. It does not support bit-set/enumeration combinations and prints too many flags from an enumeration part. This patch fixes this problem. New method `yaml::IO::maskedBitSetCase()` handle "enumeration" part of bitset defined by provided mask. Patch reviewed by Nick Kledzik and Sean Silva. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209504 91177308-0d34-0410-b5e6-96231b3b80d8
* YAMLIO: Allow scalars to dictate quotation rulesDavid Majnemer2014-04-101-1/+3
| | | | | | | Introduce ScalarTraits::mustQuote which determines whether or not a StringRef needs quoting before it is acceptable to output. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205955 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix documentation typosAlp Toker2013-12-201-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197757 91177308-0d34-0410-b5e6-96231b3b80d8
* YAML I/O add support for validate()Nick Kledzik2013-11-211-0/+38
| | | | | | | | | MappingTrait template specializations can now have a validate() method which performs semantic checking. For details, see <http://llvm.org/docs/YamlIO.html>. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195286 91177308-0d34-0410-b5e6-96231b3b80d8
* YAML I/O - Added default trait support for std:string. Making another ↵John Thompson2013-11-191-0/+1
| | | | | | attempt at this, this time doing a clean build on Linux, and running the LLVM, clang, and extra tests, to try to make sure there's no problems. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195134 91177308-0d34-0410-b5e6-96231b3b80d8
* Add simple support for tags in YAML I/ONick Kledzik2013-11-141-0/+14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194644 91177308-0d34-0410-b5e6-96231b3b80d8
* Reverting my r193344 checkin due to build breakage.John Thompson2013-10-241-1/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193350 91177308-0d34-0410-b5e6-96231b3b80d8
* Added std::string as a built-in type for mapping.John Thompson2013-10-241-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193344 91177308-0d34-0410-b5e6-96231b3b80d8
* Typo fixes.Rui Ueyama2013-09-121-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190569 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix typoRui Ueyama2013-09-111-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190492 91177308-0d34-0410-b5e6-96231b3b80d8
* [typo] An LLVM.Daniel Dunbar2013-08-161-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188589 91177308-0d34-0410-b5e6-96231b3b80d8
* [docs] Replace non-existent LLVM_YAML_UNIQUE_TYPE() macroSean Silva2013-06-041-1/+1
| | | | | | LLVM_YAML_STRONG_TYPEDEF() is the correct macro to perform this function. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183280 91177308-0d34-0410-b5e6-96231b3b80d8
* [docs] Minor doc tweaks.Daniel Dunbar2013-05-201-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182324 91177308-0d34-0410-b5e6-96231b3b80d8
* Spelling correctionsAlex Rosenberg2013-02-181-26/+26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175415 91177308-0d34-0410-b5e6-96231b3b80d8
* Documentation: replace some non-ASCII characters by equivalent markupDmitri Gribenko2013-01-191-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172917 91177308-0d34-0410-b5e6-96231b3b80d8
* docs: Fix long standing linking antipattern.Sean Silva2013-01-111-2/+0
| | | | | | | | | Before we learned about :doc:, we used :ref: and put a dummy link at the top of each page. Don't do that anymore. This fixes PR14891 as a special case. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172162 91177308-0d34-0410-b5e6-96231b3b80d8
* Initial implementation of a utility for converting native data Nick Kledzik2012-12-121-0/+862
structures to and from YAML using traits. The first client will be the test suite of lld. The documentation will show up at: http://llvm.org/docs/YamlIO.html git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170019 91177308-0d34-0410-b5e6-96231b3b80d8