9 #ifndef LLVM_CLANG_DRIVER_MULTILIB_H 10 #define LLVM_CLANG_DRIVER_MULTILIB_H 13 #include "llvm/ADT/ArrayRef.h" 14 #include "llvm/ADT/STLExtras.h" 15 #include "llvm/ADT/StringRef.h" 16 #include "llvm/Support/Compiler.h" 33 std::string GCCSuffix;
35 std::string IncludeSuffix;
40 Multilib(StringRef GCCSuffix = {}, StringRef OSSuffix = {},
41 StringRef IncludeSuffix = {},
int Priority = 0);
46 assert(GCCSuffix.empty() ||
47 (StringRef(GCCSuffix).front() ==
'/' && GCCSuffix.size() > 1));
57 assert(OSSuffix.empty() ||
58 (StringRef(OSSuffix).front() ==
'/' && OSSuffix.size() > 1));
68 assert(IncludeSuffix.empty() ||
69 (StringRef(IncludeSuffix).front() ==
'/' && IncludeSuffix.size() > 1));
93 assert(F.front() ==
'+' || F.front() ==
'-');
98 LLVM_DUMP_METHOD
void dump()
const;
100 void print(raw_ostream &OS)
const;
107 {
return GCCSuffix.empty() && OSSuffix.empty() && IncludeSuffix.empty(); }
120 std::function<std::vector<std::string>(
const Multilib &M)>;
169 unsigned size()
const {
return Multilibs.size(); }
171 LLVM_DUMP_METHOD
void dump()
const;
172 void print(raw_ostream &OS)
const;
175 IncludeCallback = std::move(F);
182 FilePathsCallback = std::move(F);
201 #endif // LLVM_CLANG_DRIVER_MULTILIB_H bool operator==(const Multilib &Other) const
bool isDefault() const
Check whether the default is selected.
const IncludeDirsFunc & includeDirsCallback() const
std::vector< Multilib > multilib_list
const IncludeDirsFunc & filePathsCallback() const
multilib_list::const_iterator const_iterator
Multilib & flag(StringRef F)
Add a flag to the flags list Flag must be a flag accepted by the driver with its leading '-' removed...
const std::string & includeSuffix() const
Get the include directory suffix.
raw_ostream & operator<<(raw_ostream &OS, const Multilib &M)
const std::string & gccSuffix() const
Get the detected GCC installation path suffix for the multi-arch target variant.
void clear()
Remove all of the multilibs from the set.
Forward-declares and imports various common LLVM datatypes that clang wants to use unqualified...
const std::string & osSuffix() const
Get the detected os path suffix for the multi-arch target variant.
MultilibSet & setIncludeDirsCallback(IncludeDirsFunc F)
const_iterator end() const
Multilib(StringRef GCCSuffix={}, StringRef OSSuffix={}, StringRef IncludeSuffix={}, int Priority=0)
std::vector< std::string > flags_list
const flags_list & flags() const
Get the flags that indicate or contraindicate this multilib's use All elements begin with either '+' ...
This corresponds to a single GCC Multilib, or a segment of one controlled by a command line flag...
int priority() const
Returns the multilib priority.
bool isValid() const
Check whether any of the 'against' flags contradict the 'for' flags.
const_iterator begin() const
char __ovld __cnfn select(char a, char b, char c)
For each component of a vector type, result[i] = if MSB of c[i] is set ? b[i] : a[i].
void print(raw_ostream &OS) const
print summary of the Multilib
MultilibSet & setFilePathsCallback(IncludeDirsFunc F)
llvm::function_ref< bool(const Multilib &)> FilterCallback
Dataflow Directional Tag Classes.
std::function< std::vector< std::string >(const Multilib &M)> IncludeDirsFunc
LLVM_DUMP_METHOD void dump() const
multilib_list::iterator iterator