clang 20.0.0git
Public Types | Public Member Functions | List of all members
clang::driver::MultilibBuilder Class Reference

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.
 
MultilibBuildergccSuffix (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.
 
MultilibBuilderosSuffix (StringRef S)
 Set the os path suffix.
 
const std::string & includeSuffix () const
 Get the include directory suffix.
 
MultilibBuilderincludeSuffix (StringRef S)
 Set the include directory suffix.
 
const flags_listflags () const
 Get the flags that indicate or contraindicate this multilib's use All elements begin with either '-' or '!'.
 
flags_listflags ()
 
MultilibBuilderflag (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.
 

Detailed Description

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.

Member Typedef Documentation

◆ flags_list

using clang::driver::MultilibBuilder::flags_list = std::vector<std::string>

Definition at line 24 of file MultilibBuilder.h.

Constructor & Destructor Documentation

◆ MultilibBuilder() [1/2]

MultilibBuilder::MultilibBuilder ( StringRef  GCCSuffix,
StringRef  OSSuffix,
StringRef  IncludeSuffix 
)

Definition at line 45 of file MultilibBuilder.cpp.

References normalizePathSegment().

◆ MultilibBuilder() [2/2]

MultilibBuilder::MultilibBuilder ( StringRef  Suffix = {})

Initializes GCCSuffix, OSSuffix & IncludeSuffix to the same value.

Definition at line 52 of file MultilibBuilder.cpp.

Member Function Documentation

◆ flag()

MultilibBuilder & MultilibBuilder::flag ( StringRef  Flag,
bool  Disallow = false 
)

◆ flags() [1/2]

flags_list & clang::driver::MultilibBuilder::flags ( )
inline

Definition at line 75 of file MultilibBuilder.h.

◆ flags() [2/2]

const flags_list & clang::driver::MultilibBuilder::flags ( ) const
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().

◆ gccSuffix() [1/2]

const std::string & clang::driver::MultilibBuilder::gccSuffix ( ) const
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().

◆ gccSuffix() [2/2]

MultilibBuilder & MultilibBuilder::gccSuffix ( StringRef  S)

Set the GCC installation path suffix.

Definition at line 55 of file MultilibBuilder.cpp.

References normalizePathSegment().

◆ includeSuffix() [1/2]

const std::string & clang::driver::MultilibBuilder::includeSuffix ( ) const
inline

Get the include directory suffix.

Always starts with a '/', unless empty

Definition at line 63 of file MultilibBuilder.h.

Referenced by compose().

◆ includeSuffix() [2/2]

MultilibBuilder & MultilibBuilder::includeSuffix ( StringRef  S)

Set the include directory suffix.

Definition at line 67 of file MultilibBuilder.cpp.

References normalizePathSegment().

◆ isDefault()

bool clang::driver::MultilibBuilder::isDefault ( ) const
inline

Check whether the default is selected.

Definition at line 88 of file MultilibBuilder.h.

◆ isValid()

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().

◆ makeMultilib()

Multilib MultilibBuilder::makeMultilib ( ) const

Definition at line 94 of file MultilibBuilder.cpp.

Referenced by findBiarchMultilibs(), and findMSP430Multilibs().

◆ osSuffix() [1/2]

const std::string & clang::driver::MultilibBuilder::osSuffix ( ) const
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().

◆ osSuffix() [2/2]

MultilibBuilder & MultilibBuilder::osSuffix ( StringRef  S)

Set the os path suffix.

Definition at line 61 of file MultilibBuilder.cpp.

References normalizePathSegment().


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