[clang] 5d1eae7 - Add support of the next Ubuntu (Ubuntu 21.04 - Hirsute Hippo)

Sylvestre Ledru via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 29 11:11:50 PDT 2020


Author: Sylvestre Ledru
Date: 2020-10-29T19:11:32+01:00
New Revision: 5d1eae7d23e3477d6044cf9d60a90ce9719f17e6

URL: https://github.com/llvm/llvm-project/commit/5d1eae7d23e3477d6044cf9d60a90ce9719f17e6
DIFF: https://github.com/llvm/llvm-project/commit/5d1eae7d23e3477d6044cf9d60a90ce9719f17e6.diff

LOG: Add support of the next Ubuntu (Ubuntu 21.04 - Hirsute Hippo)

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/clang/include/clang/Driver/Distro.h b/clang/include/clang/Driver/Distro.h
index 2b5ec9ab8eea..0e98d00764c1 100644
--- a/clang/include/clang/Driver/Distro.h
+++ b/clang/include/clang/Driver/Distro.h
@@ -70,6 +70,7 @@ class Distro {
     UbuntuEoan,
     UbuntuFocal,
     UbuntuGroovy,
+    UbuntuHirsute,
     UnknownDistro
   };
 
@@ -121,7 +122,7 @@ class Distro {
   }
 
   bool IsUbuntu() const {
-    return DistroVal >= UbuntuHardy && DistroVal <= UbuntuGroovy;
+    return DistroVal >= UbuntuHardy && DistroVal <= UbuntuHirsute;
   }
 
   bool IsAlpineLinux() const { return DistroVal == AlpineLinux; }

diff  --git a/clang/lib/Driver/Distro.cpp b/clang/lib/Driver/Distro.cpp
index 02a71cbd5a9c..ee4fe841e7ee 100644
--- a/clang/lib/Driver/Distro.cpp
+++ b/clang/lib/Driver/Distro.cpp
@@ -87,6 +87,7 @@ static Distro::DistroType DetectLsbRelease(llvm::vfs::FileSystem &VFS) {
                     .Case("eoan", Distro::UbuntuEoan)
                     .Case("focal", Distro::UbuntuFocal)
                     .Case("groovy", Distro::UbuntuGroovy)
+                    .Case("hirsute", Distro::UbuntuHirsute)
                     .Default(Distro::UnknownDistro);
   return Version;
 }


        


More information about the cfe-commits mailing list