Add support of the next Ubuntu (Ubuntu 20.04 - Focal Fossa)
authorSylvestre Ledru <sledru@mozilla.com>
Sat, 16 Nov 2019 11:20:47 +0000 (12:20 +0100)
committerSylvestre Ledru <sledru@mozilla.com>
Sat, 16 Nov 2019 11:21:54 +0000 (12:21 +0100)
clang/include/clang/Driver/Distro.h
clang/lib/Driver/Distro.cpp

index 67dc764fb7d1d3a41db5333ba370c0512a59d4eb..da8f819dee964e9a190c70f4e0c11f4a29c76591 100644 (file)
@@ -65,6 +65,7 @@ public:
     UbuntuCosmic,
     UbuntuDisco,
     UbuntuEoan,
+    UbuntuFocal,
     UnknownDistro
   };
 
@@ -118,7 +119,7 @@ public:
   }
 
   bool IsUbuntu() const {
-    return DistroVal >= UbuntuHardy && DistroVal <= UbuntuEoan;
+    return DistroVal >= UbuntuHardy && DistroVal <= UbuntuFocal;
   }
 
   bool IsAlpineLinux() const {
index f2a3074d1e701b82e2212d0ae246895010e64e44..92e04108a7e2950603184ad29df2dede8147bcb5 100644 (file)
@@ -52,6 +52,7 @@ static Distro::DistroType DetectDistro(llvm::vfs::FileSystem &VFS) {
                       .Case("cosmic", Distro::UbuntuCosmic)
                       .Case("disco", Distro::UbuntuDisco)
                       .Case("eoan", Distro::UbuntuEoan)
+                      .Case("focal", Distro::UbuntuFocal)
                       .Default(Distro::UnknownDistro);
     if (Version != Distro::UnknownDistro)
       return Version;