From 6f4dc5dae60598e71c8211b0c1a705474b0a223f Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Mon, 23 May 2022 13:49:34 +0200 Subject: [PATCH] Add support of the next Ubuntu (Ubuntu 22.10 - Kinetic Kudu) --- clang/include/clang/Driver/Distro.h | 3 ++- clang/lib/Driver/Distro.cpp | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/clang/include/clang/Driver/Distro.h b/clang/include/clang/Driver/Distro.h index c31fbd4e93f1..01d66b30b038 100644 --- a/clang/include/clang/Driver/Distro.h +++ b/clang/include/clang/Driver/Distro.h @@ -75,6 +75,7 @@ public: UbuntuHirsute, UbuntuImpish, UbuntuJammy, + UbuntuKinetic, UnknownDistro }; @@ -126,7 +127,7 @@ public: } bool IsUbuntu() const { - return DistroVal >= UbuntuHardy && DistroVal <= UbuntuJammy; + return DistroVal >= UbuntuHardy && DistroVal <= UbuntuKinetic; } bool IsAlpineLinux() const { return DistroVal == AlpineLinux; } diff --git a/clang/lib/Driver/Distro.cpp b/clang/lib/Driver/Distro.cpp index b0e2f3ac94c7..1898667279cc 100644 --- a/clang/lib/Driver/Distro.cpp +++ b/clang/lib/Driver/Distro.cpp @@ -91,6 +91,7 @@ static Distro::DistroType DetectLsbRelease(llvm::vfs::FileSystem &VFS) { .Case("hirsute", Distro::UbuntuHirsute) .Case("impish", Distro::UbuntuImpish) .Case("jammy", Distro::UbuntuJammy) + .Case("kinetic", Distro::UbuntuKinetic) .Default(Distro::UnknownDistro); return Version; }