This is an archive of the discontinued LLVM Phabricator instance.

[Driver] Refactor DetectDistro() parameters to take VFS ref only. NFC
ClosedPublic

Authored by mgorny on Oct 20 2016, 4:26 AM.

Details

Summary

Refactor the DetectDistro() function to take a single vfs::FileSystem
reference only, instead of Driver and llvm::Triple::ArchType.
The ArchType parameter was not used anyway, and Driver was only used to
obtain the VFS.

Aside to making the API simpler and more transparent, it makes it
easier to add unit tests for the function in the future -- since
the tests would need only to provide an appropriate VFS.

Diff Detail

Repository
rL LLVM

Event Timeline

mgorny updated this revision to Diff 75283.Oct 20 2016, 4:26 AM
mgorny retitled this revision from to [Driver] Refactor DetectDistro() parameters to take VFS ref only. NFC.
mgorny updated this object.
mgorny added reviewers: bruno, bkramer, rafael.
mgorny added a subscriber: cfe-commits.
bruno accepted this revision.Oct 20 2016, 1:22 PM
bruno edited edge metadata.

Very nice!

LGTM

This revision is now accepted and ready to land.Oct 20 2016, 1:22 PM
This revision was automatically updated to reflect the committed changes.