[Driver] Refactor DetectDistro() parameters to take VFS ref only. NFC
authorMichal Gorny <mgorny@gentoo.org>
Thu, 20 Oct 2016 20:45:40 +0000 (20:45 +0000)
committerMichal Gorny <mgorny@gentoo.org>
Thu, 20 Oct 2016 20:45:40 +0000 (20:45 +0000)
commit16f37c30a3d8578bf95120c9d56aac2051a57e9a
treebc7d35a916520ac264fd6dcde21a2bd44bf807ca
parent8210959afdc2cba1bee288cee7d6fca05f71592d
[Driver] Refactor DetectDistro() parameters to take VFS ref only. NFC

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.

Differential Revision: https://reviews.llvm.org/D25819

llvm-svn: 284774
clang/lib/Driver/ToolChains.cpp