[VFS] Port driver tool chains to VFS.

There are still some loose ends here but it's sufficient so we can detect
GCC headers that are inside of a VFS.

llvm-svn: 249556
This commit is contained in:
Benjamin Kramer
2015-10-07 15:48:01 +00:00
parent fd3a3b3f29
commit d45b205ed1
11 changed files with 251 additions and 147 deletions

View File

@@ -105,6 +105,11 @@ std::error_code FileSystem::makeAbsolute(SmallVectorImpl<char> &Path) const {
return llvm::sys::fs::make_absolute(WorkingDir.get(), Path);
}
bool FileSystem::exists(const Twine &Path) {
auto Status = status(Path);
return Status && Status->exists();
}
//===-----------------------------------------------------------------------===/
// RealFileSystem implementation
//===-----------------------------------------------------------------------===/