struct Generic_GCC::GCCVersion

Declaration

struct Generic_GCC::GCCVersion { /* full declaration omitted */ };

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.

Declared at: clang/lib/Driver/ToolChains/Gnu.h:161

Member Variables

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

Method Overview

  • public static clang::driver::toolchains::Generic_GCC::GCCVersion Parse(llvm::StringRef VersionText)
  • public bool isOlderThan(int RHSMajor, int RHSMinor, int RHSPatch, llvm::StringRef RHSPatchSuffix = llvm::StringRef()) const

Methods

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

Declared at: clang/lib/Driver/ToolChains/Gnu.h:174

Parameters

llvm::StringRef VersionText

bool isOlderThan(int RHSMajor,
                 int RHSMinor,
                 int RHSPatch,
                 llvm::StringRef RHSPatchSuffix =
                     llvm::StringRef()) const

Declared at: clang/lib/Driver/ToolChains/Gnu.h:175

Parameters

int RHSMajor
int RHSMinor
int RHSPatch
llvm::StringRef RHSPatchSuffix = llvm::StringRef()