Add support of the future Debian (Debian 12 - Bookworm)
authorSylvestre Ledru <sylvestre@debian.org>
Mon, 16 Aug 2021 07:07:33 +0000 (09:07 +0200)
committerSylvestre Ledru <sylvestre@debian.org>
Mon, 16 Aug 2021 07:11:31 +0000 (09:11 +0200)
https://wiki.debian.org/DebianBookworm

ETA: 2023

clang/include/clang/Driver/Distro.h
clang/lib/Driver/Distro.cpp

index 0d2a093..d9909bc 100644 (file)
@@ -37,6 +37,7 @@ public:
     DebianStretch,
     DebianBuster,
     DebianBullseye,
+    DebianBookworm,
     Exherbo,
     RHEL5,
     RHEL6,
@@ -119,7 +120,7 @@ public:
   bool IsOpenSUSE() const { return DistroVal == OpenSUSE; }
 
   bool IsDebian() const {
-    return DistroVal >= DebianLenny && DistroVal <= DebianBullseye;
+    return DistroVal >= DebianLenny && DistroVal <= DebianBookworm;
   }
 
   bool IsUbuntu() const {
index c4cf4e4..cdb5a17 100644 (file)
@@ -150,6 +150,8 @@ static Distro::DistroType DetectDistro(llvm::vfs::FileSystem &VFS) {
         return Distro::DebianBuster;
       case 11:
         return Distro::DebianBullseye;
+      case 12:
+        return Distro::DebianBookworm;
       default:
         return Distro::UnknownDistro;
       }
@@ -161,6 +163,7 @@ static Distro::DistroType DetectDistro(llvm::vfs::FileSystem &VFS) {
         .Case("stretch/sid", Distro::DebianStretch)
         .Case("buster/sid", Distro::DebianBuster)
         .Case("bullseye/sid", Distro::DebianBullseye)
+        .Case("bookworm/sid", Distro::DebianBookworm)
         .Default(Distro::UnknownDistro);
   }