Recommit [YAML IO] Check that mapping doesn't contain duplicating keys
authorAnton Sidorenko <anton.sidorenko@syntacore.com>
Mon, 13 Feb 2023 14:10:39 +0000 (17:10 +0300)
committerAnton Sidorenko <anton.sidorenko@syntacore.com>
Mon, 13 Feb 2023 14:45:07 +0000 (17:45 +0300)
commit388d679c1dfa7c0cb5c9ee6cd0b8592c3c3d09ef
tree57224b3389f3d24c3235ea580fb4cf7f42c053ec
parentd904ee3d479a0731b2f0918c057081283102f790
Recommit [YAML IO] Check that mapping doesn't contain duplicating keys

The revert reason is fixed in D143727 (test changes).

According to YAML specification keys must be unique for a mapping node:
"The content of a mapping node is an unordered set of key/value node pairs, with
the restriction that each of the keys is unique".

Differential Revision: https://reviews.llvm.org/D140474
llvm/lib/Support/YAMLTraits.cpp
llvm/unittests/Support/YAMLIOTest.cpp