This is an archive of the discontinued LLVM Phabricator instance.

[Driver] Refactor distro detection & classification as a separate API
ClosedPublic

Authored by mgorny on Oct 25 2016, 10:00 AM.

Details

Summary

Refactor the Distro enum along with helper functions into a full-fledged
Distro class, inspired by llvm::Triple, and make it a public API.
The new class wraps the enum with necessary comparison operators, adding
the convenience Is*() methods and a constructor performing
the detection. The public API is needed to run the unit tests (D25869).

Diff Detail

Event Timeline

mgorny updated this revision to Diff 75725.Oct 25 2016, 10:00 AM
mgorny retitled this revision from to [Driver] Refactor distro detection & classification as a separate API.
mgorny updated this object.
mgorny added reviewers: bruno, bkramer.
mgorny added a subscriber: cfe-commits.
bruno accepted this revision.Nov 17 2016, 2:44 PM
bruno edited edge metadata.

Very nice! LGTM

This revision is now accepted and ready to land.Nov 17 2016, 2:44 PM
mgorny updated this revision to Diff 78462.Nov 17 2016, 9:05 PM
mgorny edited edge metadata.

Thanks for the review. I've rebased on top of current master (UbuntuZesty added), and now I will update the unit tests.

This revision was automatically updated to reflect the committed changes.