Package: llvm-toolchain-6.0 / 1:6.0.1-10

ubuntu-cosmic-support.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
Description: Add Ubuntu Cosmic to the distro release list.
Author: Adam Conrad <adconrad@ubuntu.com>
Last-Update: 2018-05-03

--- llvm-toolchain-6.0-6.0.orig/clang/include/clang/Driver/Distro.h
+++ llvm-toolchain-6.0-6.0/clang/include/clang/Driver/Distro.h
@@ -61,6 +61,7 @@ public:
     UbuntuZesty,
     UbuntuArtful,
     UbuntuBionic,
+    UbuntuCosmic,
     UnknownDistro
   };
 
@@ -114,7 +115,7 @@ public:
   }
 
   bool IsUbuntu() const {
-    return DistroVal >= UbuntuHardy && DistroVal <= UbuntuBionic;
+    return DistroVal >= UbuntuHardy && DistroVal <= UbuntuCosmic;
   }
 
   bool IsAlpineLinux() const {
--- llvm-toolchain-6.0-6.0.orig/clang/lib/Driver/Distro.cpp
+++ llvm-toolchain-6.0-6.0/clang/lib/Driver/Distro.cpp
@@ -49,6 +49,7 @@ static Distro::DistroType DetectDistro(v
                       .Case("zesty", Distro::UbuntuZesty)
                       .Case("artful", Distro::UbuntuArtful)
                       .Case("bionic", Distro::UbuntuBionic)
+                      .Case("cosmic", Distro::UbuntuCosmic)
                       .Default(Distro::UnknownDistro);
     if (Version != Distro::UnknownDistro)
       return Version;