| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
This will be used to YAMLify parts of the module summary.
Differential Revision: https://reviews.llvm.org/D28014
llvm-svn: 290935
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some scanner errors were not checked and reported by the parser.
Fix PR30934. Recommit r288014 after fixing unittest.
Patch by: Serge Guelton <serge.guelton@telecom-bretagne.eu>
Differential Revision: https://reviews.llvm.org/D26419
llvm-svn: 288071
|
|
|
|
|
|
| |
This reverts commit r288014, the unittest isn't passing
llvm-svn: 288015
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some scanner errors were not checked and reported by the parser.
Fix PR30934
Patch by: Serge Guelton <serge.guelton@telecom-bretagne.eu>
Differential Revision: https://reviews.llvm.org/D26419
llvm-svn: 288014
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
mapping a yaml field to an object in code has always been
a stateless operation. You could still pass state by using the
`setContext` function of the YAMLIO object, but this represented
global state for the entire yaml input. In order to have
context-sensitive state, it is necessary to pass this state in
at the granularity of an individual mapping.
This patch adds support for this type of context-sensitive state.
You simply pass an additional argument of type T to the
`mapRequired` or `mapOptional` functions, and provided you have
specialized a `MappingContextTraits<U, T>` class with the
appropriate mapping function, you can pass this context into
the mapping function.
Reviewed By: chandlerc
Differential Revision: https://reviews.llvm.org/D24162
llvm-svn: 280977
|
|
|
|
|
|
|
|
|
|
| |
This allows mapping of any endian-aware type whose underlying
type (e.g. uint32_t) provides a ScalarTraits specialization.
Reviewed by: majnemer
Differential Revision: http://reviews.llvm.org/D21057
llvm-svn: 272049
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Removed some unused headers, replaced some headers with forward class declarations.
Found using simple scripts like this one:
clear && ack --cpp -l '#include "llvm/ADT/IndexedMap.h"' | xargs grep -L 'IndexedMap[<]' | xargs grep -n --color=auto 'IndexedMap'
Patch by Eugene Kosov <claprix@yandex.ru>
Differential Revision: http://reviews.llvm.org/D19219
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 266595
|
|
|
|
|
|
|
|
| |
the value in an optional mapping).
This change breaks clang-format tests.
llvm-svn: 239976
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
optional mapping.
This commit ensures that a value that's passed into YAML's IO mapOptional method
is going to be assigned a value returned by the default constructor for that
value's type when the appropriate key is not present in the YAML mapping.
Reviewers: Duncan P. N. Exon Smith
Differential Revision: http://reviews.llvm.org/D10492
llvm-svn: 239972
|
|
|
|
|
|
|
| |
Hope this fixes the bits, eg:
http://lab.llvm.org:8011/builders/clang-hexagon-elf/builds/27147
llvm-svn: 238586
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch fixes a bug where the YAML Output class emitted
a sequence of flow sequences without the '-' characters.
Before:
seq:
[ a, b ]
[ c, d ]
After:
seq:
- [ a, b ]
- [ c, d ]
Reviewers: Justin Bogner
Differential Revision: http://reviews.llvm.org/D9206
llvm-svn: 236329
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When reading a yaml::SequenceTraits object, YAMLIO does not report an
error if the yaml item is not a sequence. Instead, YAMLIO reads an
empty sequence. For example:
---
seq:
foo: 1
bar: 2
...
If `seq` is a SequenceTraits object, then reading the above yaml will
yield `seq` as an empty sequence.
Fix this to report an error for the above mapping ("not a sequence")
Patch by William Fisher. Thanks!
llvm-svn: 230976
|
|
|
|
|
|
|
| |
The problem was in unchecked dyn_cast inside of Input::createHNodes.
Patch by Roman Kashitsyn!
llvm-svn: 215205
|
|
|
|
| |
llvm-svn: 210442
|
|
|
|
| |
llvm-svn: 210072
|
|
|
|
|
|
|
| |
Introduce ScalarTraits::mustQuote which determines whether or not a
StringRef needs quoting before it is acceptable to output.
llvm-svn: 205955
|
|
|
|
|
|
|
|
|
| |
Don't quote octal compatible strings if they are only two wide, they
aren't ambiguous.
This reverts commit r205857 which reverted r205857.
llvm-svn: 205914
|
|
|
|
|
|
|
|
| |
This reverts commit r205839.
It broke several tests in lld.
llvm-svn: 205857
|
|
|
|
|
|
|
|
|
|
| |
YAMLIO would turn a BinaryRef into the string 0000000004000000.
However, the leading zero causes parsers to interpret it as being an
octal number instead of a hexadecimal one.
Instead, escape such strings as needed.
llvm-svn: 205839
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 195285
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
Fixes http://llvm.org/PR16221, http://llvm.org/PR15927
Phabricator: http://llvm-reviews.chandlerc.com/D1236
Patch by Andrew Tulloch!
llvm-svn: 195016
|
|
|
|
| |
llvm-svn: 194658
|
|
|
|
| |
llvm-svn: 194655
|
|
|
|
| |
llvm-svn: 194644
|
|
|
|
| |
llvm-svn: 193350
|
|
|
|
| |
llvm-svn: 193344
|
|
|
|
| |
llvm-svn: 190485
|
|
|
|
|
|
| |
It was turning the buildbots red.
llvm-svn: 190480
|
|
|
|
| |
llvm-svn: 190472
|
|
|
|
|
|
|
|
| |
YAMLIO printed a string as is without quotes unless it contains a newline
character. That did not suffice. We also need to quote a string if it starts
with a backquote, quote, double quote or atsign, or it's the empty string.
llvm-svn: 190469
|
|
|
|
| |
llvm-svn: 188525
|
|
|
|
|
|
|
|
| |
empty sequence is the first key/value in a map which is itself in a sequence.
Patch with help from Nick Kledzik.
llvm-svn: 188508
|
|
|
|
| |
llvm-svn: 172108
|
|
|
|
| |
llvm-svn: 172107
|
|
|
|
| |
llvm-svn: 172105
|
|
|
|
|
|
|
| |
Use memcpy to do type punning instead of a cast. A cast or similar
operation through a union breaks strict aliasing rules.
llvm-svn: 172081
|
|
|
|
|
|
|
| |
Update test case to verify flow sequence is
written as a flow sequence.
llvm-svn: 171514
|
|
|
|
| |
llvm-svn: 170376
|
|
|
|
| |
llvm-svn: 170369
|
|
|
|
| |
llvm-svn: 170035
|
|
|
|
| |
llvm-svn: 170033
|
|
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
|