[PATCH] D59289: YAMLIO: Improve endian type support

Pavel Labath via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 13 02:51:24 PDT 2019


labath created this revision.
labath added reviewers: zturner, sammccall.
Herald added a subscriber: kristina.
Herald added a project: LLVM.

Now that endian types support enumerations (D59141 <https://reviews.llvm.org/D59141>), the existing yaml
support for them is somewhat insufficient. The current solution was to
define the ScalarTraits class for these types, which always forwards to
the ScalarTraits of the underlying type. However, the enum types will
usually have ScalarEnumerationTraits of ScalarBitsetTraits.

In this patch I add the two extra Traits types to the endian types. In
order to properly SFINAE-ize them, I've also added an extra "Enable"
template argument to the Traits template classes.


Repository:
  rL LLVM

https://reviews.llvm.org/D59289

Files:
  include/llvm/Support/YAMLTraits.h
  unittests/Support/YAMLIOTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D59289.190384.patch
Type: text/x-patch
Size: 6892 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190313/3fc90205/attachment.bin>


More information about the llvm-commits mailing list