clang  8.0.0svn
Public Types | Public Member Functions | List of all members
clang::driver::MultilibSet Class Reference

#include "clang/Driver/Multilib.h"

Public Types

using multilib_list = std::vector< Multilib >
 
using iterator = multilib_list::iterator
 
using const_iterator = multilib_list::const_iterator
 
using IncludeDirsFunc = std::function< std::vector< std::string >(const Multilib &M)>
 
using FilterCallback = llvm::function_ref< bool(const Multilib &)>
 

Public Member Functions

 MultilibSet ()=default
 
MultilibSetMaybe (const Multilib &M)
 Add an optional Multilib segment. More...
 
MultilibSetEither (const Multilib &M1, const Multilib &M2)
 Add a set of mutually incompatible Multilib segments. More...
 
MultilibSetEither (const Multilib &M1, const Multilib &M2, const Multilib &M3)
 
MultilibSetEither (const Multilib &M1, const Multilib &M2, const Multilib &M3, const Multilib &M4)
 
MultilibSetEither (const Multilib &M1, const Multilib &M2, const Multilib &M3, const Multilib &M4, const Multilib &M5)
 
MultilibSetEither (ArrayRef< Multilib > Ms)
 
MultilibSetFilterOut (FilterCallback F)
 Filter out some subset of the Multilibs using a user defined callback. More...
 
MultilibSetFilterOut (const char *Regex)
 Filter out those Multilibs whose gccSuffix matches the given expression. More...
 
void push_back (const Multilib &M)
 Add a completed Multilib to the set. More...
 
void combineWith (const MultilibSet &MS)
 Union this set of multilibs with another. More...
 
void clear ()
 Remove all of the multilibs from the set. More...
 
iterator begin ()
 
const_iterator begin () const
 
iterator end ()
 
const_iterator end () const
 
bool select (const Multilib::flags_list &Flags, Multilib &M) const
 Pick the best multilib in the set,. More...
 
unsigned size () const
 
LLVM_DUMP_METHOD void dump () const
 
void print (raw_ostream &OS) const
 
MultilibSetsetIncludeDirsCallback (IncludeDirsFunc F)
 
const IncludeDirsFuncincludeDirsCallback () const
 
MultilibSetsetFilePathsCallback (IncludeDirsFunc F)
 
const IncludeDirsFuncfilePathsCallback () const
 

Detailed Description

Definition at line 110 of file Multilib.h.

Member Typedef Documentation

◆ const_iterator

using clang::driver::MultilibSet::const_iterator = multilib_list::const_iterator

Definition at line 114 of file Multilib.h.

◆ FilterCallback

using clang::driver::MultilibSet::FilterCallback = llvm::function_ref<bool(const Multilib &)>

Definition at line 117 of file Multilib.h.

◆ IncludeDirsFunc

using clang::driver::MultilibSet::IncludeDirsFunc = std::function<std::vector<std::string>(const Multilib &M)>

Definition at line 116 of file Multilib.h.

◆ iterator

using clang::driver::MultilibSet::iterator = multilib_list::iterator

Definition at line 113 of file Multilib.h.

◆ multilib_list

Definition at line 112 of file Multilib.h.

Constructor & Destructor Documentation

◆ MultilibSet()

clang::driver::MultilibSet::MultilibSet ( )
default

Member Function Documentation

◆ begin() [1/2]

iterator clang::driver::MultilibSet::begin ( )
inline

Definition at line 156 of file Multilib.h.

Referenced by combineWith().

◆ begin() [2/2]

const_iterator clang::driver::MultilibSet::begin ( ) const
inline

Definition at line 157 of file Multilib.h.

◆ clear()

void clang::driver::MultilibSet::clear ( )
inline

Remove all of the multilibs from the set.

Definition at line 154 of file Multilib.h.

◆ combineWith()

void MultilibSet::combineWith ( const MultilibSet MS)

Union this set of multilibs with another.

Definition at line 234 of file Multilib.cpp.

References begin(), and end().

◆ dump()

LLVM_DUMP_METHOD void MultilibSet::dump ( ) const

Definition at line 274 of file Multilib.cpp.

References clang::driver::Multilib::print().

◆ Either() [1/5]

MultilibSet & MultilibSet::Either ( const Multilib M1,
const Multilib M2 
)

◆ Either() [2/5]

MultilibSet & MultilibSet::Either ( const Multilib M1,
const Multilib M2,
const Multilib M3 
)

Definition at line 156 of file Multilib.cpp.

◆ Either() [3/5]

MultilibSet & MultilibSet::Either ( const Multilib M1,
const Multilib M2,
const Multilib M3,
const Multilib M4 
)

Definition at line 161 of file Multilib.cpp.

◆ Either() [4/5]

MultilibSet & MultilibSet::Either ( const Multilib M1,
const Multilib M2,
const Multilib M3,
const Multilib M4,
const Multilib M5 
)

Definition at line 166 of file Multilib.cpp.

◆ Either() [5/5]

MultilibSet & MultilibSet::Either ( ArrayRef< Multilib Ms)

Definition at line 191 of file Multilib.cpp.

References compose(), and clang::driver::Multilib::isValid().

◆ end() [1/2]

iterator clang::driver::MultilibSet::end ( )
inline

Definition at line 159 of file Multilib.h.

Referenced by combineWith().

◆ end() [2/2]

const_iterator clang::driver::MultilibSet::end ( ) const
inline

Definition at line 160 of file Multilib.h.

References select().

◆ filePathsCallback()

const IncludeDirsFunc& clang::driver::MultilibSet::filePathsCallback ( ) const
inline

Definition at line 182 of file Multilib.h.

References clang::driver::operator<<().

◆ FilterOut() [1/2]

MultilibSet & MultilibSet::FilterOut ( FilterCallback  F)

Filter out some subset of the Multilibs using a user defined callback.

Definition at line 212 of file Multilib.cpp.

Referenced by findAndroidArmMultilibs(), findBiarchMultilibs(), findMipsAndroidMultilibs(), findMipsCsMultilibs(), findMipsImgMultilibs(), and findMipsMtiMultilibs().

◆ FilterOut() [2/2]

MultilibSet & MultilibSet::FilterOut ( const char *  Regex)

Filter out those Multilibs whose gccSuffix matches the given expression.

Definition at line 217 of file Multilib.cpp.

References clang::driver::Multilib::gccSuffix().

◆ includeDirsCallback()

const IncludeDirsFunc& clang::driver::MultilibSet::includeDirsCallback ( ) const
inline

Definition at line 175 of file Multilib.h.

◆ Maybe()

MultilibSet & MultilibSet::Maybe ( const Multilib M)

◆ print()

void MultilibSet::print ( raw_ostream &  OS) const

Definition at line 278 of file Multilib.cpp.

Referenced by clang::driver::operator<<().

◆ push_back()

void MultilibSet::push_back ( const Multilib M)

Add a completed Multilib to the set.

Definition at line 232 of file Multilib.cpp.

Referenced by findBiarchMultilibs(), and findMipsImgMultilibs().

◆ select()

bool MultilibSet::select ( const Multilib::flags_list Flags,
Multilib M 
) const

Pick the best multilib in the set,.

Returns
false if none are compatible

Definition at line 244 of file Multilib.cpp.

References clang::driver::Multilib::flags(), and isFlagEnabled().

Referenced by findAndroidArmMultilibs(), findBiarchMultilibs(), findMipsAndroidMultilibs(), findMipsImgMultilibs(), findMipsMuslMultilibs(), and findRISCVMultilibs().

◆ setFilePathsCallback()

MultilibSet& clang::driver::MultilibSet::setFilePathsCallback ( IncludeDirsFunc  F)
inline

Definition at line 177 of file Multilib.h.

◆ setIncludeDirsCallback()

MultilibSet& clang::driver::MultilibSet::setIncludeDirsCallback ( IncludeDirsFunc  F)
inline

◆ size()

unsigned clang::driver::MultilibSet::size ( ) const
inline

Definition at line 165 of file Multilib.h.

References clang::driver::Multilib::dump(), and clang::driver::Multilib::print().

Referenced by findMipsCsMultilibs().


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