clang API Documentation

Public Member Functions | Static Public Member Functions | Public Attributes
clang::driver::toolchains::Generic_GCC::GCCVersion Struct Reference

Struct to store and manipulate GCC versions. More...

#include <ToolChains.h>

Collaboration diagram for clang::driver::toolchains::Generic_GCC::GCCVersion:
Collaboration graph
[legend]

List of all members.

Public Member Functions

bool operator< (const GCCVersion &RHS) const
 Less-than for GCCVersion, implementing a Strict Weak Ordering.
bool operator> (const GCCVersion &RHS) const
bool operator<= (const GCCVersion &RHS) const
bool operator>= (const GCCVersion &RHS) const

Static Public Member Functions

static GCCVersion Parse (StringRef VersionText)

Public Attributes

std::string Text
 The unparsed text of the version.
int Major
 The parsed major, minor, and patch numbers.
int Minor
int Patch
std::string PatchSuffix
 Any textual suffix on the patch number.

Detailed Description

Struct to store and manipulate GCC versions.

We rely on assumptions about the form and structure of GCC version numbers: they consist of at most three '.'-separated components, and each component is a non-negative integer except for the last component. For the last component we are very flexible in order to tolerate release candidates or 'x' wildcards.

Note that the ordering established among GCCVersions is based on the preferred version string to use. For example we prefer versions without a hard-coded patch number to those with a hard coded patch number.

Currently this doesn't provide any logic for textual suffixes to patches in the way that (for example) Debian's version format does. If that ever becomes necessary, it can be added.

Definition at line 46 of file ToolChains.h.


Member Function Documentation

bool Generic_GCC::GCCVersion::operator< ( const GCCVersion RHS) const

Less-than for GCCVersion, implementing a Strict Weak Ordering.

Definition at line 1019 of file ToolChains.cpp.

References Major, Minor, Patch, and PatchSuffix.

bool clang::driver::toolchains::Generic_GCC::GCCVersion::operator<= ( const GCCVersion RHS) const [inline]

Definition at line 59 of file ToolChains.h.

bool clang::driver::toolchains::Generic_GCC::GCCVersion::operator> ( const GCCVersion RHS) const [inline]

Definition at line 58 of file ToolChains.h.

bool clang::driver::toolchains::Generic_GCC::GCCVersion::operator>= ( const GCCVersion RHS) const [inline]

Definition at line 60 of file ToolChains.h.

static GCCVersion clang::driver::toolchains::Generic_GCC::GCCVersion::Parse ( StringRef  VersionText) [static]

Member Data Documentation

The parsed major, minor, and patch numbers.

Definition at line 51 of file ToolChains.h.

Referenced by operator<().

Definition at line 51 of file ToolChains.h.

Referenced by operator<().

Definition at line 51 of file ToolChains.h.

Referenced by operator<().

Any textual suffix on the patch number.

Definition at line 54 of file ToolChains.h.

Referenced by operator<().

The unparsed text of the version.

Definition at line 48 of file ToolChains.h.


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