diff options
Diffstat (limited to 'clang/lib/Driver/Distro.cpp')
| -rw-r--r-- | clang/lib/Driver/Distro.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/clang/lib/Driver/Distro.cpp b/clang/lib/Driver/Distro.cpp index c4cf4e48b5b8..5ac38c34d112 100644 --- a/clang/lib/Driver/Distro.cpp +++ b/clang/lib/Driver/Distro.cpp @@ -90,6 +90,7 @@ static Distro::DistroType DetectLsbRelease(llvm::vfs::FileSystem &VFS) { .Case("groovy", Distro::UbuntuGroovy) .Case("hirsute", Distro::UbuntuHirsute) .Case("impish", Distro::UbuntuImpish) + .Case("jammy", Distro::UbuntuJammy) .Default(Distro::UnknownDistro); return Version; } @@ -118,11 +119,11 @@ static Distro::DistroType DetectDistro(llvm::vfs::FileSystem &VFS) { return Distro::Fedora; if (Data.startswith("Red Hat Enterprise Linux") || Data.startswith("CentOS") || Data.startswith("Scientific Linux")) { - if (Data.find("release 7") != StringRef::npos) + if (Data.contains("release 7")) return Distro::RHEL7; - else if (Data.find("release 6") != StringRef::npos) + else if (Data.contains("release 6")) return Distro::RHEL6; - else if (Data.find("release 5") != StringRef::npos) + else if (Data.contains("release 5")) return Distro::RHEL5; } return Distro::UnknownDistro; @@ -150,6 +151,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 +164,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); } |
