1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-18 10:32:48 +02:00
Commit Graph

30 Commits

Author SHA1 Message Date
Whisperity
cb3c17db3f [NFC][llvm][docs] YamlIO: StringRef validate -> std::string validate
A change in the API happened as per http://reviews.llvm.org/D89463
(latest related commit b9e2b59680ad1bbfd2b9110b3ebf3d2b22cad51b)
but the RST documentation was not updated to match this at that time.
2021-07-09 11:49:37 +02:00
Kazu Hirata
9d2bb4e874 [llvm] Fix typos in documentation (NFC) 2021-02-27 10:09:23 -08:00
Eric Schweitz
377ffc3bc4 remove a trailing space character (test commit) 2020-01-27 15:01:55 -08:00
Kazuaki Ishizaki
09203c3fb4 [llvm] NFC: fix trivial typos in documents
Reviewers: hans, Jim

Reviewed By: Jim

Subscribers: jvesely, nhaehnle, mgorny, arphaman, bmahjour, kerbowa, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D73017
2020-01-22 11:32:51 +08:00
Jonas Devlieghere
52f3fce00c [Docs] Fix LLVM_YAML_IS_DOCUMENT_LIST_VECTOR
The docs incorrectly said to repeat std::vector inside
LLVM_YAML_IS_DOCUMENT_LIST_VECTOR.

llvm-svn: 337695
2018-07-23 14:17:43 +00:00
Francis Visoiu Mistrih
061acf9c7f [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

llvm-svn: 320996
2017-12-18 17:38:03 +00:00
Sylvestre Ledru
f96210978c fix some typos in the doc
llvm-svn: 292014
2017-01-14 11:37:01 +00:00
Vedant Kumar
97ba04777b [docs] Fix typo in YamlIO.rst
Patch by Mario Lang!

llvm-svn: 259825
2016-02-04 20:42:43 +00:00
Frederic Riss
9f6be643e9 [YAMLIO] Make line-wrapping configurable and test it.
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

llvm-svn: 238584
2015-05-29 17:56:28 +00:00
Alex Lorenz
ebb5069d3b YAML: Add support for literal block scalar I/O.
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

llvm-svn: 237404
2015-05-14 23:08:22 +00:00
Alex Lorenz
92999a396f YAML: Add an optional 'flow' field to the mapping trait to allow flow 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

llvm-svn: 236456
2015-05-04 20:11:40 +00:00
Alex Lorenz
5814edb368 Update YamlIO documentation for the ScalarTraits class.
This patch adds the missing context parameter to the
input and output methods in ScalarTraits.

Differential Revision: http://reviews.llvm.org/D9173

llvm-svn: 236328
2015-05-01 18:20:23 +00:00
Ed Maste
b8c5d92511 Correct 'teh' and other typos / repeated words.
Patch by Eitan Adler.

Differential Revision:	http://reviews.llvm.org/D8514

llvm-svn: 234939
2015-04-14 20:52:58 +00:00
Simon Atanasyan
f56e5acb21 [YAML] Add an optional argument EnumMask to the yaml::IO::bitSetCase().
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.

llvm-svn: 209504
2014-05-23 08:07:09 +00:00
David Majnemer
60de53a3e4 YAMLIO: Allow scalars to dictate quotation rules
Introduce ScalarTraits::mustQuote which determines whether or not a
StringRef needs quoting before it is acceptable to output.

llvm-svn: 205955
2014-04-10 07:37:33 +00:00
Alp Toker
20f2bae8eb Fix documentation typos
llvm-svn: 197757
2013-12-20 00:33:39 +00:00
Nick Kledzik
3e803171af YAML I/O add support for validate()
MappingTrait template specializations can now have a validate() method which 
performs semantic checking. For details, see <http://llvm.org/docs/YamlIO.html>.

llvm-svn: 195286
2013-11-21 00:28:07 +00:00
John Thompson
844100cb0c YAML I/O - Added default trait support for std:string. Making another 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.
llvm-svn: 195134
2013-11-19 17:28:21 +00:00
Nick Kledzik
cbecad4abd Add simple support for tags in YAML I/O
llvm-svn: 194644
2013-11-14 00:59:59 +00:00
John Thompson
551080bf52 Reverting my r193344 checkin due to build breakage.
llvm-svn: 193350
2013-10-24 14:52:56 +00:00
John Thompson
d6f9322368 Added std::string as a built-in type for mapping.
llvm-svn: 193344
2013-10-24 13:36:58 +00:00
Rui Ueyama
4c059baf98 Typo fixes.
llvm-svn: 190569
2013-09-12 01:43:21 +00:00
Rui Ueyama
85d68da178 Fix typo
llvm-svn: 190492
2013-09-11 05:22:01 +00:00
Daniel Dunbar
657fb30f68 [typo] An LLVM.
llvm-svn: 188589
2013-08-16 23:30:19 +00:00
Sean Silva
5e55efb957 [docs] Replace non-existent LLVM_YAML_UNIQUE_TYPE() macro
LLVM_YAML_STRONG_TYPEDEF() is the correct macro to perform this function.

llvm-svn: 183280
2013-06-04 23:36:41 +00:00
Daniel Dunbar
8a10ff14a8 [docs] Minor doc tweaks.
llvm-svn: 182324
2013-05-20 22:39:48 +00:00
Alex Rosenberg
fcf0ba8099 Spelling corrections
llvm-svn: 175415
2013-02-18 02:44:09 +00:00
Dmitri Gribenko
b654055f0c Documentation: replace some non-ASCII characters by equivalent markup
llvm-svn: 172917
2013-01-19 20:34:20 +00:00
Sean Silva
e593654d4f docs: Fix long standing linking antipattern.
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.

llvm-svn: 172162
2013-01-11 02:28:08 +00:00
Nick Kledzik
2516df02eb Initial implementation of a utility for converting native data
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

llvm-svn: 170019
2012-12-12 20:46:15 +00:00