clang 20.0.0git
|
This corresponds to a single GCC multilib, or a segment of one controlled by a command line flag. More...
#include "clang/Driver/MultilibBuilder.h"
Public Types | |
using | flags_list = std::vector< std::string > |
Public Member Functions | |
MultilibBuilder (StringRef GCCSuffix, StringRef OSSuffix, StringRef IncludeSuffix) | |
MultilibBuilder (StringRef Suffix={}) | |
Initializes GCCSuffix, OSSuffix & IncludeSuffix to the same value. | |
const std::string & | gccSuffix () const |
Get the detected GCC installation path suffix for the multi-arch target variant. | |
MultilibBuilder & | gccSuffix (StringRef S) |
Set the GCC installation path suffix. | |
const std::string & | osSuffix () const |
Get the detected os path suffix for the multi-arch target variant. | |
MultilibBuilder & | osSuffix (StringRef S) |
Set the os path suffix. | |
const std::string & | includeSuffix () const |
Get the include directory suffix. | |
MultilibBuilder & | includeSuffix (StringRef S) |
Set the include directory suffix. | |
const flags_list & | flags () const |
Get the flags that indicate or contraindicate this multilib's use All elements begin with either '-' or '!'. | |
flags_list & | flags () |
MultilibBuilder & | flag (StringRef Flag, bool Disallow=false) |
Add a flag to the flags list Flag must be a flag accepted by the driver. | |
Multilib | makeMultilib () const |
bool | isValid () const |
Check whether any of the 'against' flags contradict the 'for' flags. | |
bool | isDefault () const |
Check whether the default is selected. | |
This corresponds to a single GCC multilib, or a segment of one controlled by a command line flag.
This class can be used to create a Multilib, and contains helper functions to mutate it before creating a Multilib instance with makeMultilib().
Definition at line 22 of file MultilibBuilder.h.
using clang::driver::MultilibBuilder::flags_list = std::vector<std::string> |
Definition at line 24 of file MultilibBuilder.h.
MultilibBuilder::MultilibBuilder | ( | StringRef | GCCSuffix, |
StringRef | OSSuffix, | ||
StringRef | IncludeSuffix | ||
) |
Definition at line 45 of file MultilibBuilder.cpp.
References normalizePathSegment().
MultilibBuilder::MultilibBuilder | ( | StringRef | Suffix = {} | ) |
Initializes GCCSuffix, OSSuffix & IncludeSuffix to the same value.
Definition at line 52 of file MultilibBuilder.cpp.
MultilibBuilder & MultilibBuilder::flag | ( | StringRef | Flag, |
bool | Disallow = false |
||
) |
Add a flag to the flags list Flag
must be a flag accepted by the driver.
Disallow
defines whether the flag is negated and therefore disallowed.
Definition at line 89 of file MultilibBuilder.cpp.
References clang::driver::tools::addMultilibFlag().
Referenced by findAndroidArmMultilibs(), findBiarchMultilibs(), findCSKYMultilibs(), findMipsCsMultilibs(), findMipsImgMultilibs(), findMipsMtiMultilibs(), findMipsMuslMultilibs(), findMSP430Multilibs(), findRISCVBareMetalMultilibs(), findRISCVMultilibs(), clang::driver::MultilibSetBuilder::Maybe(), and selectRISCVMultilib().
|
inline |
Definition at line 75 of file MultilibBuilder.h.
|
inline |
Get the flags that indicate or contraindicate this multilib's use All elements begin with either '-' or '!'.
Definition at line 74 of file MultilibBuilder.h.
Referenced by compose(), and clang::driver::MultilibSetBuilder::Maybe().
|
inline |
Get the detected GCC installation path suffix for the multi-arch target variant.
Always starts with a '/', unless empty
Definition at line 41 of file MultilibBuilder.h.
Referenced by compose(), clang::driver::MultilibSetBuilder::FilterOut(), findBiarchMultilibs(), and findMipsCsMultilibs().
MultilibBuilder & MultilibBuilder::gccSuffix | ( | StringRef | S | ) |
Set the GCC installation path suffix.
Definition at line 55 of file MultilibBuilder.cpp.
References normalizePathSegment().
|
inline |
Get the include directory suffix.
Always starts with a '/', unless empty
Definition at line 63 of file MultilibBuilder.h.
Referenced by compose().
MultilibBuilder & MultilibBuilder::includeSuffix | ( | StringRef | S | ) |
Set the include directory suffix.
Definition at line 67 of file MultilibBuilder.cpp.
References normalizePathSegment().
|
inline |
Check whether the default is selected.
Definition at line 88 of file MultilibBuilder.h.
bool MultilibBuilder::isValid | ( | ) | const |
Check whether any of the 'against' flags contradict the 'for' flags.
Definition at line 73 of file MultilibBuilder.cpp.
Referenced by clang::driver::MultilibSetBuilder::Either().
Multilib MultilibBuilder::makeMultilib | ( | ) | const |
Definition at line 94 of file MultilibBuilder.cpp.
Referenced by findBiarchMultilibs(), and findMSP430Multilibs().
|
inline |
Get the detected os path suffix for the multi-arch target variant.
Always starts with a '/', unless empty
Definition at line 52 of file MultilibBuilder.h.
Referenced by compose(), findMipsImgMultilibs(), findMipsMtiMultilibs(), and findMipsMuslMultilibs().
MultilibBuilder & MultilibBuilder::osSuffix | ( | StringRef | S | ) |
Set the os path suffix.
Definition at line 61 of file MultilibBuilder.cpp.
References normalizePathSegment().