14 #ifndef LLVM_TEXTAPI_MACHO_INTERFACE_FILE_H 15 #define LLVM_TEXTAPI_MACHO_INTERFACE_FILE_H 88 : InstallName(InstallName), Targets(
std::move(Targets)) {}
93 template <
typename RangeT>
void addTargets(RangeT &&Targets) {
94 for (
const auto &Target : Targets)
95 addTarget(Target(Target));
109 return std::tie(InstallName, Targets) == std::tie(O.InstallName, O.Targets);
113 return std::tie(InstallName, Targets) != std::tie(O.InstallName, O.Targets);
117 return std::tie(InstallName, Targets) < std::tie(O.InstallName, O.Targets);
121 std::string InstallName;
132 : Kind(Kind), Name(Name) {}
203 template <
typename RangeT>
void addTargets(RangeT &&Targets) {
204 for (
const auto &Target_ : Targets)
205 addTarget(Target(Target_));
214 std::function<bool(const Target &)>>;
233 CompatibilityVersion =
Version;
259 ObjcConstraint = Constraint;
274 void addParentUmbrella(
const Target &Target_,
StringRef Parent);
275 const std::vector<std::pair<Target, std::string>> &
umbrellas()
const {
276 return ParentUmbrellas;
281 return ParentUmbrellas;
293 void addAllowableClient(
StringRef InstallName,
const Target &Target);
299 return AllowableClients;
306 void addReexportedLibrary(
StringRef InstallName,
const Target &Target);
312 return ReexportedLibraries;
325 void addUUID(
const Target &Target, uint8_t UUID[16]);
330 const std::vector<std::pair<Target, std::string>> &
uuids()
const {
341 const_symbol_iterator, SymbolMapType::const_iterator,
342 std::forward_iterator_tag, const Symbol *, ptrdiff_t,
343 const Symbol *, const Symbol *> {
346 template <
typename U>
358 std::function<bool(const Symbol *)>>;
363 return {Symbols.begin(), Symbols.end()};
367 std::function<bool(const Symbol *)> fn = [](
const Symbol *
Symbol) {
371 make_range<const_symbol_iterator>({Symbols.begin()}, {Symbols.end()}),
376 std::function<bool(const Symbol *)> fn = [](
const Symbol *
Symbol) {
380 make_range<const_symbol_iterator>({Symbols.begin()}, {Symbols.end()}),
391 memcpy(Ptr, String.
data(), String.
size());
392 return StringRef(reinterpret_cast<const char *>(Ptr), String.
size());
398 std::string InstallName;
401 uint8_t SwiftABIVersion{0};
402 bool IsTwoLevelNamespace{
false};
403 bool IsAppExtensionSafe{
false};
404 bool IsInstallAPI{
false};
406 std::vector<std::pair<Target, std::string>> ParentUmbrellas;
407 std::vector<InterfaceFileRef> AllowableClients;
408 std::vector<InterfaceFileRef> ReexportedLibraries;
409 std::vector<std::pair<Target, std::string>> UUIDs;
416 #endif // LLVM_TEXTAPI_MACHO_INTERFACE_FILE_H FileType getFileType() const
Get the file type.
const_symbol_iterator(U &&u)
TargetList::const_iterator const_target_iterator
Defines the interface file.
typename SuperClass::const_iterator const_iterator
This class represents lattice values for constants.
Retain/Release or Garbage Collection.
Text-based stub file (.tbd) version 2.0.
amdgpu Simplify well known AMD library false FunctionCallee Value const Twine & Name
ArchitectureSet mapToArchitectureSet(ArrayRef< Target > Targets)
static SymbolsMapKey getEmptyKey()
Reference to an interface file.
void setInstallAPI(bool V=true)
Specify if this file was generated during InstallAPI (or not).
This file defines the MallocAllocator and BumpPtrAllocator interfaces.
const std::vector< InterfaceFileRef > & allowableClients() const
Get the list of allowable clients.
void setTwoLevelNamespace(bool V=true)
Specify if the library uses two-level namespace (or flat namespace).
const std::vector< InterfaceFileRef > & reexportedLibraries() const
Get the list of re-exported libraries.
StringRef getInstallName() const
Text-based stub file (.tbd) version 1.0.
void addTargets(RangeT &&Targets)
Set and add targets.
LLVM_NODISCARD bool empty() const
empty - Check if the string is empty.
void setObjCConstraint(ObjCConstraintType Constraint)
Set the Objective-C constraint.
static SymbolsMapKey getTombstoneKey()
const std::vector< std::pair< Target, std::string > > getParentUmbrellas() const
Get the parent umbrella framework.
void setFileType(FileType Kind)
Set the file type.
InterfaceFileRef(StringRef InstallName, const TargetList Targets)
LLVM_NODISCARD size_t size() const
size - Get the string size.
hash_code hash_value(const APFloat &Arg)
See friend declarations above.
const std::vector< std::pair< Target, std::string > > & uuids() const
Get the list of Target/UUID pairs.
void setCurrentVersion(PackedVersion Version)
Set the current version of the library.
ArchitectureSet getArchitectures() const
void addTargets(RangeT &&Targets)
pointer operator->() const
InterfaceFileRef(StringRef InstallName)
const_filtered_symbol_range exports() const
StringRef getPath() const
Get the path from which this file was generated (if applicable).
Allocate memory in an ever growing pool, as if by bump-pointer.
CRTP base class for adapting an iterator to a different type.
PlatformSet getPlatforms() const
bool isTwoLevelNamespace() const
Check if the library uses two-level namespace.
SmallSet - This maintains a set of unique values, optimizing for the case when the set is small (less...
uint8_t getSwiftABIVersion() const
Get the Swift ABI version of the library.
SymbolsMapKey(MachO::SymbolKind Kind, StringRef Name)
Text-based stub file (.tbd) version 3.0.
Retain/Release for Simulator.
bool isApplicationExtensionSafe() const
Check if the library is application extension safe.
bool operator<(const InterfaceFileRef &O) const
bool isInstallAPI() const
Check if this file was generated during InstallAPI.
reference operator*() const
ObjCConstraintType
Defines a list of Objective-C constraints.
StringRef getInstallName() const
Get the install name of the library.
TargetList::const_iterator const_target_iterator
bool operator==(const InterfaceFileRef &O) const
FileType
Defines the file type this file represents.
const_target_range targets() const
std::pair< llvm::MachO::Target, std::string > UUID
void setInstallName(StringRef InstallName_)
Set the install name of the library.
A range adaptor for a pair of iterators.
LLVM_ATTRIBUTE_RETURNS_NONNULL LLVM_ATTRIBUTE_RETURNS_NOALIAS void * Allocate(size_t Size, Align Alignment)
Allocate space at the specified alignment.
hash_code hash_combine(const Ts &...args)
Combine values into a single hash_code.
void setSwiftABIVersion(uint8_t Version)
Set the Swift ABI version of the library.
const std::vector< std::pair< Target, std::string > > & umbrellas() const
void setApplicationExtensionSafe(bool V=true)
Specify if the library is application extension safe (or not).
void setPath(StringRef Path_)
Set the path from which this file was generated (if applicable).
ArchitectureSet getArchitectures() const
Get the architectures.
PlatformSet mapToPlatformSet(ArrayRef< Triple > Targets)
void setCompatibilityVersion(PackedVersion Version)
Set the compatibility version of the library.
ObjCConstraintType getObjCConstraint() const
Get the Objective-C constraint.
bool operator!=(const InterfaceFileRef &O) const
const_target_range targets() const
PlatformSet getPlatforms() const
Get the platforms.
iterator_range< filter_iterator< detail::IterOfRange< RangeT >, PredicateT > > make_filter_range(RangeT &&Range, PredicateT Pred)
Convenience function that takes a range of elements and a predicate, and return a new filter_iterator...
PackedVersion getCompatibilityVersion() const
Get the compatibility version of the library.
LLVM_NODISCARD const char * data() const
data - Get a pointer to the start of the string (which may not be null terminated).
static unsigned getHashValue(const SymbolsMapKey &Key)
PackedVersion getCurrentVersion() const
Get the current version of the library.
const_symbol_range symbols() const
Specialization of filter_iterator_base for forward iteration only.
StringRef - Represent a constant reference to a string, i.e.
Text-based stub file (.tbd) version 4.0.
const_filtered_symbol_range undefineds() const
static bool isEqual(const SymbolsMapKey &LHS, const SymbolsMapKey &RHS)