From 3aeb17c0c83af34fee9afb3efe3122bad77f557f Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Thu, 10 May 2018 08:45:43 +0000 Subject: [PATCH] Add support of the next Ubuntu (Ubuntu 18.10 - Cosmic Canimal) Patch by Adam Conrad git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@331965 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/Driver/Distro.h | 3 ++- lib/Driver/Distro.cpp | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/include/clang/Driver/Distro.h b/include/clang/Driver/Distro.h index 4ab4e2ae99..7b34a09256 100644 --- a/include/clang/Driver/Distro.h +++ b/include/clang/Driver/Distro.h @@ -61,6 +61,7 @@ public: UbuntuZesty, UbuntuArtful, UbuntuBionic, + UbuntuCosmic, UnknownDistro }; @@ -114,7 +115,7 @@ public: } bool IsUbuntu() const { - return DistroVal >= UbuntuHardy && DistroVal <= UbuntuBionic; + return DistroVal >= UbuntuHardy && DistroVal <= UbuntuCosmic; } bool IsAlpineLinux() const { diff --git a/lib/Driver/Distro.cpp b/lib/Driver/Distro.cpp index f15c919b9a..3fbf1637dd 100644 --- a/lib/Driver/Distro.cpp +++ b/lib/Driver/Distro.cpp @@ -49,6 +49,7 @@ static Distro::DistroType DetectDistro(vfs::FileSystem &VFS) { .Case("zesty", Distro::UbuntuZesty) .Case("artful", Distro::UbuntuArtful) .Case("bionic", Distro::UbuntuBionic) + .Case("cosmic", Distro::UbuntuCosmic) .Default(Distro::UnknownDistro); if (Version != Distro::UnknownDistro) return Version; -- 2.50.1