This is an archive of the discontinued LLVM Phabricator instance.

Exhaustively test all permutations of triple parts in TripleTest.
ClosedPublic

Authored by dougk on Apr 16 2015, 12:55 PM.

Details

Summary

On account of evolution of the enum types, iteration over "everything" didn't really work.

Diff Detail

Repository
rL LLVM

Event Timeline

dougk updated this revision to Diff 23871.Apr 16 2015, 12:55 PM
dougk retitled this revision from to Exhaustively test all permutations of triple parts in TripleTest..
dougk updated this object.
dougk edited the test plan for this revision. (Show Details)
dougk added a subscriber: Unknown Object (MLST).

We can't use constexpr (yet), MSVC 2013 doesn't support it. Would it be possible to fold the Max values into the enums?

dougk updated this revision to Diff 23877.Apr 16 2015, 1:36 PM

Changing 'constexpr' to 'const'

Just a minor tweak on my end.

include/llvm/ADT/Triple.h
87 ↗(On Diff #23877)

In lots of other parts of LLVM, we add an extra "last" enum, I think I'd prefer that slightly.

dougk updated this revision to Diff 24756.Apr 30 2015, 11:39 AM

use the 'Last<mumble>' idiom instead of a separate Max constant.

dougk added inline comments.Apr 30 2015, 11:40 AM
include/llvm/ADT/Triple.h
87 ↗(On Diff #23877)

done. Thanks for the suggestion!

chandlerc accepted this revision.Apr 30 2015, 11:47 AM
chandlerc added a reviewer: chandlerc.

LGTM!

This revision is now accepted and ready to land.Apr 30 2015, 11:47 AM
This revision was automatically updated to reflect the committed changes.