File assume-opensuse.patch of Package llvm9
Index: cfe-8.0.0rc3.src/lib/Driver/Distro.cpp
===================================================================
--- cfe-8.0.0rc3.src.orig/lib/Driver/Distro.cpp
+++ cfe-8.0.0rc3.src/lib/Driver/Distro.cpp
@@ -19,6 +19,8 @@ using namespace clang::driver;
using namespace clang;
static Distro::DistroType DetectDistro(llvm::vfs::FileSystem &VFS) {
+ return Distro::OpenSUSE;
+/*
llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>> File =
VFS.getBufferForFile("/etc/lsb-release");
if (File) {
@@ -141,7 +143,7 @@ static Distro::DistroType DetectDistro(l
if (VFS.exists("/etc/gentoo-release"))
return Distro::Gentoo;
- return Distro::UnknownDistro;
+ return Distro::UnknownDistro;*/
}
Distro::Distro(llvm::vfs::FileSystem &VFS) : DistroVal(DetectDistro(VFS)) {}
Index: cfe-8.0.0rc3.src/unittests/Driver/CMakeLists.txt
===================================================================
--- cfe-8.0.0rc3.src.orig/unittests/Driver/CMakeLists.txt
+++ cfe-8.0.0rc3.src/unittests/Driver/CMakeLists.txt
@@ -5,7 +5,6 @@ set(LLVM_LINK_COMPONENTS
)
add_clang_unittest(ClangDriverTests
- DistroTest.cpp
ToolChainTest.cpp
ModuleCacheTest.cpp
MultilibTest.cpp