clang 10.0.0git

Public Types | List of all members
clang::driver::Distro Class Reference

Distro - Helper class for detecting and classifying Linux distributions. More...

`#include "clang/Driver/Distro.h"`

## Public Types
enum | DistroType { AlpineLinux, ArchLinux, DebianLenny, DebianSqueeze, DebianWheezy, DebianJessie, DebianStretch, DebianBuster, DebianBullseye, Exherbo, RHEL5, RHEL6, RHEL7, Fedora, Gentoo, OpenSUSE, UbuntuHardy, UbuntuIntrepid, UbuntuJaunty, UbuntuKarmic, UbuntuLucid, UbuntuMaverick, UbuntuNatty, UbuntuOneiric, UbuntuPrecise, UbuntuQuantal, UbuntuRaring, UbuntuSaucy, UbuntuTrusty, UbuntuUtopic, UbuntuVivid, UbuntuWily, UbuntuXenial, UbuntuYakkety, UbuntuZesty, UbuntuArtful, UbuntuBionic, UbuntuCosmic, UbuntuDisco, UbuntuEoan, UbuntuFocal, UnknownDistro }

## Public Member Functions
Constructors
| Distro ()
| Default constructor leaves the distribution unknown. More...
| Distro (DistroType D)
| Constructs a Distro type for specific distribution. More...
| Distro (llvm::vfs::FileSystem &VFS, const llvm::Triple &TargetOrHost)
| Detects the distribution using specified VFS. More...
bool | operator== (const Distro &Other) const
bool | operator!= (const Distro &Other) const
bool | operator>= (const Distro &Other) const
bool | operator<= (const Distro &Other) const
Convenience Predicates
bool | IsRedhat () const
bool | IsOpenSUSE () const
bool | IsDebian () const
bool | IsUbuntu () const
bool | IsAlpineLinux () const
bool | IsGentoo () const

## Detailed Description

Distro - Helper class for detecting and classifying Linux distributions.

This class encapsulates the clang Linux distribution detection mechanism as well as helper functions that match the specific (versioned) results into wider distribution classes.

Definition at line 23 of file Distro.h.

## Member Enumeration Documentation

## ◆ DistroType

enum clang::driver::Distro::DistroType

Enumerator
AlpineLinux |
ArchLinux |
DebianLenny |
DebianSqueeze |
DebianWheezy |
DebianJessie |
DebianStretch |
DebianBuster |
DebianBullseye |
Exherbo |
RHEL5 |
RHEL6 |
RHEL7 |
Fedora |
Gentoo |
OpenSUSE |
UbuntuHardy |
UbuntuIntrepid |
UbuntuJaunty |
UbuntuKarmic |
UbuntuLucid |
UbuntuMaverick |
UbuntuNatty |
UbuntuOneiric |
UbuntuPrecise |
UbuntuQuantal |
UbuntuRaring |
UbuntuSaucy |
UbuntuTrusty |
UbuntuUtopic |
UbuntuVivid |
UbuntuWily |
UbuntuXenial |
UbuntuYakkety |
UbuntuZesty |
UbuntuArtful |
UbuntuBionic |
UbuntuCosmic |
UbuntuDisco |
UbuntuEoan |
UbuntuFocal |
UnknownDistro |

Definition at line 25 of file Distro.h.

## Constructor & Destructor Documentation

## ◆ Distro() [1/3]

clang::driver::Distro::Distro | ( |  | ) |
| inline

Default constructor leaves the distribution unknown.

Definition at line 82 of file Distro.h.

Referenced by Distro().

## ◆ Distro() [2/3]

clang::driver::Distro::Distro | ( | DistroType | D | ) |
| inline

Constructs a Distro type for specific distribution.

Definition at line 85 of file Distro.h.

References Distro().

## ◆ Distro() [3/3]

Distro::Distro | ( | llvm::vfs::FileSystem & | VFS,
|  | const llvm::Triple & | TargetOrHost
| ) |  |
| explicit

Detects the distribution using specified VFS.

Definition at line 169 of file Distro.cpp.

## Member Function Documentation

## ◆ IsAlpineLinux()

bool clang::driver::Distro::IsAlpineLinux | ( |  | ) | const
| inline

Definition at line 126 of file Distro.h.

References AlpineLinux.

Referenced by clang::driver::toolchains::Linux::Linux().

## ◆ IsDebian()

bool clang::driver::Distro::IsDebian | ( |  | ) | const
| inline

Definition at line 118 of file Distro.h.

References DebianBullseye, and DebianLenny.

Referenced by clang::driver::toolchains::Linux::Linux().

## ◆ IsGentoo()

bool clang::driver::Distro::IsGentoo | ( |  | ) | const
| inline

Definition at line 130 of file Distro.h.

References Gentoo.

## ◆ IsOpenSUSE()

bool clang::driver::Distro::IsOpenSUSE | ( |  | ) | const
| inline

Definition at line 114 of file Distro.h.

References OpenSUSE.

Referenced by clang::driver::toolchains::Linux::Linux().

## ◆ IsRedhat()

bool clang::driver::Distro::IsRedhat | ( |  | ) | const
| inline

Definition at line 110 of file Distro.h.

References Fedora, RHEL5, and RHEL7.

Referenced by clang::driver::toolchains::Linux::Linux().

## ◆ IsUbuntu()

bool clang::driver::Distro::IsUbuntu | ( |  | ) | const
| inline

Definition at line 122 of file Distro.h.

References UbuntuFocal, and UbuntuHardy.

Referenced by clang::driver::toolchains::Linux::Linux().

## ◆ operator!=()

bool clang::driver::Distro::operator!= | ( | const Distro & | Other | ) | const
| inline

Definition at line 94 of file Distro.h.

## ◆ operator<=()

bool clang::driver::Distro::operator<= | ( | const Distro & | Other | ) | const
| inline

Definition at line 102 of file Distro.h.

## ◆ operator==()

bool clang::driver::Distro::operator== | ( | const Distro & | Other | ) | const
| inline

Definition at line 90 of file Distro.h.

## ◆ operator>=()

bool clang::driver::Distro::operator>= | ( | const Distro & | Other | ) | const
| inline

Definition at line 98 of file Distro.h.

The documentation for this class was generated from the following files:

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