Index: lib/Driver/ToolChains.cpp =================================================================== --- lib/Driver/ToolChains.cpp +++ lib/Driver/ToolChains.cpp @@ -3912,8 +3912,11 @@ return UnknownDistro; } - if (D.getVFS().exists("/etc/SuSE-release")) - return OpenSUSE; + File = llvm::MemoryBuffer::getFile("/etc/SuSE-release"); + if (File) + return llvm::StringSwitch(File.get()->getBuffer()) + .StartsWith("openSUSE", OpenSUSE) + .Default(UnknownDistro); if (D.getVFS().exists("/etc/exherbo-release")) return Exherbo;