static Distro DetectDistro(const Driver &D, llvm::Triple::ArchType Arch) {
llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>> File =
- llvm::MemoryBuffer::getFile("/etc/lsb-release");
+ D.getVFS().getBufferForFile("/etc/lsb-release");
if (File) {
StringRef Data = File.get()->getBuffer();
SmallVector<StringRef, 16> Lines;
return Version;
}
- File = llvm::MemoryBuffer::getFile("/etc/redhat-release");
+ File = D.getVFS().getBufferForFile("/etc/redhat-release");
if (File) {
StringRef Data = File.get()->getBuffer();
if (Data.startswith("Fedora release"))
return UnknownDistro;
}
- File = llvm::MemoryBuffer::getFile("/etc/debian_version");
+ File = D.getVFS().getBufferForFile("/etc/debian_version");
if (File) {
StringRef Data = File.get()->getBuffer();
if (Data[0] == '5')