clang
17.0.0git
|
This corresponds to a single GCC Multilib, or a segment of one controlled by a command line flag. More...
#include "clang/Driver/Multilib.h"
Public Types | |
using | flags_list = std::vector< std::string > |
Public Member Functions | |
Multilib (StringRef GCCSuffix={}, StringRef OSSuffix={}, StringRef IncludeSuffix={}, int Priority=0) | |
const std::string & | gccSuffix () const |
Get the detected GCC installation path suffix for the multi-arch target variant. More... | |
Multilib & | gccSuffix (StringRef S) |
Set the GCC installation path suffix. More... | |
const std::string & | osSuffix () const |
Get the detected os path suffix for the multi-arch target variant. More... | |
Multilib & | osSuffix (StringRef S) |
Set the os path suffix. More... | |
const std::string & | includeSuffix () const |
Get the include directory suffix. More... | |
Multilib & | includeSuffix (StringRef S) |
Set the include directory suffix. More... | |
const flags_list & | flags () const |
Get the flags that indicate or contraindicate this multilib's use All elements begin with either '+' or '-'. More... | |
flags_list & | flags () |
int | priority () const |
Returns the multilib priority. More... | |
Multilib & | flag (StringRef F) |
Add a flag to the flags list Flag must be a flag accepted by the driver with its leading '-' removed, and replaced with either: '-' which contraindicates using this multilib with that flag or: '+' which promotes using this multilib in the presence of that flag otherwise '-print-multi-lib' will not emit them correctly. More... | |
LLVM_DUMP_METHOD void | dump () const |
void | print (raw_ostream &OS) const |
print summary of the Multilib More... | |
bool | isValid () const |
Check whether any of the 'against' flags contradict the 'for' flags. More... | |
bool | isDefault () const |
Check whether the default is selected. More... | |
bool | operator== (const Multilib &Other) const |
This corresponds to a single GCC Multilib, or a segment of one controlled by a command line flag.
Definition at line 28 of file Multilib.h.
using clang::driver::Multilib::flags_list = std::vector<std::string> |
Definition at line 30 of file Multilib.h.
Multilib::Multilib | ( | StringRef | GCCSuffix = {} , |
StringRef | OSSuffix = {} , |
||
StringRef | IncludeSuffix = {} , |
||
int | Priority = 0 |
||
) |
Definition at line 53 of file Multilib.cpp.
References normalizePathSegment().
LLVM_DUMP_METHOD void Multilib::dump | ( | ) | const |
Definition at line 80 of file Multilib.cpp.
References print().
|
inline |
Add a flag to the flags list Flag
must be a flag accepted by the driver with its leading '-' removed, and replaced with either: '-' which contraindicates using this multilib with that flag or: '+' which promotes using this multilib in the presence of that flag otherwise '-print-multi-lib' will not emit them correctly.
Definition at line 92 of file Multilib.h.
References string().
Referenced by findAndroidArmMultilibs(), findCSKYMultilibs(), findMipsCsMultilibs(), findMipsImgMultilibs(), findMipsMtiMultilibs(), findMipsMuslMultilibs(), findMSP430Multilibs(), findRISCVBareMetalMultilibs(), and findRISCVMultilibs().
|
inline |
Definition at line 79 of file Multilib.h.
|
inline |
Get the flags that indicate or contraindicate this multilib's use All elements begin with either '+' or '-'.
Definition at line 78 of file Multilib.h.
Referenced by compose(), clang::driver::MultilibSet::Maybe(), and clang::driver::MultilibSet::select().
|
inline |
Get the detected GCC installation path suffix for the multi-arch target variant.
Always starts with a '/', unless empty
Definition at line 45 of file Multilib.h.
Referenced by compose(), clang::driver::MultilibSet::FilterOut(), findBiarchMultilibs(), findMipsCsMultilibs(), findMipsImgMultilibs(), findMipsMtiMultilibs(), findRISCVBareMetalMultilibs(), clang::driver::ToolChain::getCompilerRTPath(), clang::driver::Driver::HandleImmediateArgs(), clang::driver::toolchains::MSP430ToolChain::MSP430ToolChain(), and operator==().
Multilib & Multilib::gccSuffix | ( | StringRef | S | ) |
Set the GCC installation path suffix.
Definition at line 62 of file Multilib.cpp.
|
inline |
Get the include directory suffix.
Always starts with a '/', unless empty
Definition at line 67 of file Multilib.h.
Referenced by clang::driver::toolchains::Generic_GCC::addGCCLibStdCxxIncludePaths(), clang::driver::toolchains::Linux::addLibStdCxxIncludePaths(), clang::driver::toolchains::CSKYToolChain::addLibStdCxxIncludePaths(), clang::driver::toolchains::RISCVToolChain::addLibStdCxxIncludePaths(), clang::driver::toolchains::Solaris::addLibStdCxxIncludePaths(), clang::driver::toolchains::MyriadToolChain::addLibStdCxxIncludePaths(), compose(), findMipsCsMultilibs(), findMipsImgMultilibs(), findMipsMtiMultilibs(), and operator==().
Multilib & Multilib::includeSuffix | ( | StringRef | S | ) |
Set the include directory suffix.
Definition at line 74 of file Multilib.cpp.
|
inline |
Check whether the default is selected.
Definition at line 106 of file Multilib.h.
Referenced by clang::driver::toolchains::Fuchsia::Fuchsia(), and clang::driver::toolchains::Generic_GCC::GCCInstallationDetector::print().
bool Multilib::isValid | ( | ) | const |
Check whether any of the 'against' flags contradict the 'for' flags.
Definition at line 98 of file Multilib.cpp.
Referenced by clang::driver::MultilibSet::Either().
Definition at line 114 of file Multilib.cpp.
References gccSuffix(), includeSuffix(), and osSuffix().
|
inline |
Get the detected os path suffix for the multi-arch target variant.
Always starts with a '/', unless empty
Definition at line 56 of file Multilib.h.
Referenced by compose(), clang::driver::toolchains::MipsLLVMToolChain::computeSysRoot(), clang::driver::toolchains::Linux::computeSysRoot(), clang::driver::toolchains::BareMetal::computeSysRoot(), findMipsImgMultilibs(), findMipsMtiMultilibs(), findMipsMuslMultilibs(), clang::driver::toolchains::MipsLLVMToolChain::getCompilerRT(), clang::driver::toolchains::Linux::Linux(), and operator==().
Multilib & Multilib::osSuffix | ( | StringRef | S | ) |
Set the os path suffix.
Definition at line 68 of file Multilib.cpp.
void Multilib::print | ( | raw_ostream & | OS | ) | const |
print summary of the Multilib
Definition at line 84 of file Multilib.cpp.
Referenced by dump(), and clang::driver::operator<<().
|
inline |
Returns the multilib priority.
When more than one multilib matches flags, the one with the highest priority is selected, with 0 being the default.
Definition at line 83 of file Multilib.h.
References Priority.
Referenced by clang::driver::MultilibSet::select().