This is an archive of the discontinued LLVM Phabricator instance.

YAMLIO: Improve endian type support
ClosedPublic

Authored by labath on Mar 13 2019, 2:50 AM.

Details

Summary

Now that endian types support enumerations (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.

Diff Detail

Repository
rL LLVM

Event Timeline

labath created this revision.Mar 13 2019, 2:50 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 13 2019, 2:50 AM
Herald added a subscriber: kristina. · View Herald Transcript
zturner accepted this revision.Mar 13 2019, 8:55 AM
This revision is now accepted and ready to land.Mar 13 2019, 8:55 AM
This revision was automatically updated to reflect the committed changes.