Movatterモバイル変換


[0]ホーム

URL:


LLVM 20.0.0git
InterfaceFile.cpp
Go to the documentation of this file.
1//===- InterfaceFile.cpp --------------------------------------------------===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8//
9// Implements the Interface File.
10//
11//===----------------------------------------------------------------------===//
12
13#include "llvm/TextAPI/InterfaceFile.h"
14#include "llvm/TextAPI/RecordsSlice.h"
15#include "llvm/TextAPI/TextAPIError.h"
16#include <iomanip>
17#include <sstream>
18
19using namespacellvm;
20using namespacellvm::MachO;
21
22voidInterfaceFileRef::addTarget(constTarget &Target) {
23addEntry(Targets,Target);
24}
25
26voidInterfaceFile::addAllowableClient(StringRef InstallName,
27constTarget &Target) {
28if (InstallName.empty())
29return;
30auto Client =addEntry(AllowableClients, InstallName);
31 Client->addTarget(Target);
32}
33
34voidInterfaceFile::addReexportedLibrary(StringRef InstallName,
35constTarget &Target) {
36if (InstallName.empty())
37return;
38autoLib =addEntry(ReexportedLibraries, InstallName);
39Lib->addTarget(Target);
40}
41
42voidInterfaceFile::addParentUmbrella(constTarget &Target_,StringRef Parent) {
43if (Parent.empty())
44return;
45auto Iter =lower_bound(ParentUmbrellas, Target_,
46 [](const std::pair<Target, std::string> &LHS,
47TargetRHS) {returnLHS.first <RHS; });
48
49if ((Iter != ParentUmbrellas.end()) && !(Target_ < Iter->first)) {
50 Iter->second = std::string(Parent);
51return;
52 }
53
54 ParentUmbrellas.emplace(Iter, Target_, std::string(Parent));
55}
56
57voidInterfaceFile::addRPath(StringRef RPath,constTarget &InputTarget) {
58if (RPath.empty())
59return;
60usingRPathEntryT =const std::pair<Target, std::string>;
61 RPathEntryT Entry(InputTarget, RPath);
62auto Iter =
63lower_bound(RPaths, Entry,
64 [](RPathEntryT &LHS, RPathEntryT &RHS) {returnLHS <RHS; });
65
66if ((Iter != RPaths.end()) && (*Iter == Entry))
67return;
68
69 RPaths.emplace(Iter, Entry);
70}
71
72voidInterfaceFile::addTarget(constTarget &Target) {
73addEntry(Targets,Target);
74}
75
76InterfaceFile::const_filtered_target_range
77InterfaceFile::targets(ArchitectureSet Archs) const{
78 std::function<bool(constTarget &)> fn = [Archs](constTarget &Target_) {
79return Archs.has(Target_.Arch);
80 };
81returnmake_filter_range(Targets, fn);
82}
83
84voidInterfaceFile::addDocument(std::shared_ptr<InterfaceFile> &&Document) {
85auto Pos =llvm::lower_bound(Documents, Document,
86 [](const std::shared_ptr<InterfaceFile> &LHS,
87const std::shared_ptr<InterfaceFile> &RHS) {
88returnLHS->InstallName <RHS->InstallName;
89 });
90assert((Pos == Documents.end() ||
91 (*Pos)->InstallName != Document->InstallName) &&
92"Unexpected duplicate document added");
93 Document->Parent =this;
94 Documents.insert(Pos, Document);
95}
96
97voidInterfaceFile::inlineLibrary(std::shared_ptr<InterfaceFile> Library,
98bool Overwrite) {
99auto AddFwk = [&](std::shared_ptr<InterfaceFile> &&Reexport) {
100auto It =lower_bound(
101 Documents, Reexport->getInstallName(),
102 [](std::shared_ptr<InterfaceFile> &Lhs,constStringRef Rhs) {
103 return Lhs->getInstallName() < Rhs;
104 });
105
106if (Overwrite && It != Documents.end() &&
107 Reexport->getInstallName() == (*It)->getInstallName()) {
108 std::replace(Documents.begin(), Documents.end(), *It,
109 std::move(Reexport));
110return;
111 }
112
113if ((It != Documents.end()) &&
114 !(Reexport->getInstallName() < (*It)->getInstallName()))
115return;
116
117 Documents.emplace(It, std::move(Reexport));
118 };
119for (auto Doc : Library->documents())
120 AddFwk(std::move(Doc));
121
122 Library->Documents.clear();
123 AddFwk(std::move(Library));
124}
125
126Expected<std::unique_ptr<InterfaceFile>>
127InterfaceFile::merge(constInterfaceFile *O) const{
128// Verify files can be merged.
129if (getInstallName() != O->getInstallName()) {
130return make_error<StringError>("install names do not match",
131inconvertibleErrorCode());
132 }
133
134if (getCurrentVersion() != O->getCurrentVersion()) {
135return make_error<StringError>("current versions do not match",
136inconvertibleErrorCode());
137 }
138
139if (getCompatibilityVersion() != O->getCompatibilityVersion()) {
140return make_error<StringError>("compatibility versions do not match",
141inconvertibleErrorCode());
142 }
143
144if ((getSwiftABIVersion() != 0) && (O->getSwiftABIVersion() != 0) &&
145 (getSwiftABIVersion() != O->getSwiftABIVersion())) {
146return make_error<StringError>("swift ABI versions do not match",
147inconvertibleErrorCode());
148 }
149
150if (isTwoLevelNamespace() != O->isTwoLevelNamespace()) {
151return make_error<StringError>("two level namespace flags do not match",
152inconvertibleErrorCode());
153 }
154
155if (isApplicationExtensionSafe() != O->isApplicationExtensionSafe()) {
156return make_error<StringError>(
157"application extension safe flags do not match",
158inconvertibleErrorCode());
159 }
160
161 std::unique_ptr<InterfaceFile> IF(newInterfaceFile());
162 IF->setFileType(std::max(getFileType(), O->getFileType()));
163 IF->setPath(getPath());
164 IF->setInstallName(getInstallName());
165 IF->setCurrentVersion(getCurrentVersion());
166 IF->setCompatibilityVersion(getCompatibilityVersion());
167
168if (getSwiftABIVersion() == 0)
169 IF->setSwiftABIVersion(O->getSwiftABIVersion());
170else
171 IF->setSwiftABIVersion(getSwiftABIVersion());
172
173 IF->setTwoLevelNamespace(isTwoLevelNamespace());
174 IF->setApplicationExtensionSafe(isApplicationExtensionSafe());
175 IF->setOSLibNotForSharedCache(isOSLibNotForSharedCache());
176
177for (constauto &It :umbrellas()) {
178if (!It.second.empty())
179 IF->addParentUmbrella(It.first, It.second);
180 }
181for (constauto &It : O->umbrellas()) {
182if (!It.second.empty())
183 IF->addParentUmbrella(It.first, It.second);
184 }
185 IF->addTargets(targets());
186 IF->addTargets(O->targets());
187
188for (constauto &Lib :allowableClients())
189for (constauto &Target :Lib.targets())
190 IF->addAllowableClient(Lib.getInstallName(),Target);
191
192for (constauto &Lib : O->allowableClients())
193for (constauto &Target :Lib.targets())
194 IF->addAllowableClient(Lib.getInstallName(),Target);
195
196for (constauto &Lib :reexportedLibraries())
197for (constauto &Target :Lib.targets())
198 IF->addReexportedLibrary(Lib.getInstallName(),Target);
199
200for (constauto &Lib : O->reexportedLibraries())
201for (constauto &Target :Lib.targets())
202 IF->addReexportedLibrary(Lib.getInstallName(),Target);
203
204for (constauto &[Target, Path] :rpaths())
205 IF->addRPath(Path,Target);
206for (constauto &[Target, Path] : O->rpaths())
207 IF->addRPath(Path,Target);
208
209for (constauto *Sym :symbols()) {
210 IF->addSymbol(Sym->getKind(),Sym->getName(),Sym->targets(),
211Sym->getFlags());
212 }
213
214for (constauto *Sym : O->symbols()) {
215 IF->addSymbol(Sym->getKind(),Sym->getName(),Sym->targets(),
216Sym->getFlags());
217 }
218
219return std::move(IF);
220}
221
222Expected<std::unique_ptr<InterfaceFile>>
223InterfaceFile::remove(Architecture Arch) const{
224if (getArchitectures() == Arch)
225return make_error<StringError>("cannot remove last architecture slice '" +
226getArchitectureName(Arch) +"'",
227inconvertibleErrorCode());
228
229if (!getArchitectures().has(Arch)) {
230bool Found =false;
231for (auto &Doc : Documents) {
232if (Doc->getArchitectures().has(Arch)) {
233 Found =true;
234break;
235 }
236 }
237
238if (!Found)
239return make_error<TextAPIError>(TextAPIErrorCode::NoSuchArchitecture);
240 }
241
242// FIXME: Figure out how to keep these attributes in sync when new ones are
243// added.
244 std::unique_ptr<InterfaceFile> IF(newInterfaceFile());
245 IF->setFileType(getFileType());
246 IF->setPath(getPath());
247 IF->addTargets(targets(ArchitectureSet::All().clear(Arch)));
248 IF->setInstallName(getInstallName());
249 IF->setCurrentVersion(getCurrentVersion());
250 IF->setCompatibilityVersion(getCompatibilityVersion());
251 IF->setSwiftABIVersion(getSwiftABIVersion());
252 IF->setTwoLevelNamespace(isTwoLevelNamespace());
253 IF->setApplicationExtensionSafe(isApplicationExtensionSafe());
254 IF->setOSLibNotForSharedCache(isOSLibNotForSharedCache());
255for (constauto &It :umbrellas())
256if (It.first.Arch != Arch)
257 IF->addParentUmbrella(It.first, It.second);
258
259for (constauto &Lib :allowableClients()) {
260for (constauto &Target :Lib.targets())
261if (Target.Arch != Arch)
262 IF->addAllowableClient(Lib.getInstallName(),Target);
263 }
264
265for (constauto &Lib :reexportedLibraries()) {
266for (constauto &Target :Lib.targets())
267if (Target.Arch != Arch)
268 IF->addReexportedLibrary(Lib.getInstallName(),Target);
269 }
270
271for (constauto *Sym :symbols()) {
272auto Archs =Sym->getArchitectures();
273 Archs.clear(Arch);
274if (Archs.empty())
275continue;
276
277 IF->addSymbol(Sym->getKind(),Sym->getName(),Sym->targets(Archs),
278Sym->getFlags());
279 }
280
281for (auto &Doc : Documents) {
282// Skip the inlined document if the to be removed architecture is the
283// only one left.
284if (Doc->getArchitectures() == Arch)
285continue;
286
287// If the document doesn't contain the arch, then no work is to be done
288// and it can be copied over.
289if (!Doc->getArchitectures().has(Arch)) {
290auto NewDoc = Doc;
291 IF->addDocument(std::move(NewDoc));
292continue;
293 }
294
295auto Result = Doc->remove(Arch);
296if (!Result)
297return Result;
298
299 IF->addDocument(std::move(Result.get()));
300 }
301
302return std::move(IF);
303}
304
305Expected<std::unique_ptr<InterfaceFile>>
306InterfaceFile::extract(Architecture Arch) const{
307if (!getArchitectures().has(Arch)) {
308return make_error<StringError>("file doesn't have architecture '" +
309getArchitectureName(Arch) +"'",
310inconvertibleErrorCode());
311 }
312
313 std::unique_ptr<InterfaceFile> IF(newInterfaceFile());
314 IF->setFileType(getFileType());
315 IF->setPath(getPath());
316 IF->addTargets(targets(Arch));
317 IF->setInstallName(getInstallName());
318 IF->setCurrentVersion(getCurrentVersion());
319 IF->setCompatibilityVersion(getCompatibilityVersion());
320 IF->setSwiftABIVersion(getSwiftABIVersion());
321 IF->setTwoLevelNamespace(isTwoLevelNamespace());
322 IF->setApplicationExtensionSafe(isApplicationExtensionSafe());
323 IF->setOSLibNotForSharedCache(isOSLibNotForSharedCache());
324for (constauto &It :umbrellas())
325if (It.first.Arch == Arch)
326 IF->addParentUmbrella(It.first, It.second);
327
328for (constauto &It :rpaths())
329if (It.first.Arch == Arch)
330 IF->addRPath(It.second, It.first);
331
332for (constauto &Lib :allowableClients())
333for (constauto &Target :Lib.targets())
334if (Target.Arch == Arch)
335 IF->addAllowableClient(Lib.getInstallName(),Target);
336
337for (constauto &Lib :reexportedLibraries())
338for (constauto &Target :Lib.targets())
339if (Target.Arch == Arch)
340 IF->addReexportedLibrary(Lib.getInstallName(),Target);
341
342for (constauto *Sym :symbols()) {
343if (Sym->hasArchitecture(Arch))
344 IF->addSymbol(Sym->getKind(),Sym->getName(),Sym->targets(Arch),
345Sym->getFlags());
346 }
347
348for (auto &Doc : Documents) {
349// Skip documents that don't have the requested architecture.
350if (!Doc->getArchitectures().has(Arch))
351continue;
352
353auto Result = Doc->extract(Arch);
354if (!Result)
355return Result;
356
357 IF->addDocument(std::move(Result.get()));
358 }
359
360return std::move(IF);
361}
362
363voidInterfaceFile::setFromBinaryAttrs(constRecordsSlice::BinaryAttrs &BA,
364constTarget &Targ) {
365if (getFileType() != BA.File)
366setFileType(BA.File);
367if (getInstallName().empty())
368setInstallName(BA.InstallName);
369if (BA.AppExtensionSafe && !isApplicationExtensionSafe())
370setApplicationExtensionSafe();
371if (BA.TwoLevelNamespace && !isTwoLevelNamespace())
372setTwoLevelNamespace();
373if (BA.OSLibNotForSharedCache && !isOSLibNotForSharedCache())
374setOSLibNotForSharedCache();
375if (getCurrentVersion().empty())
376setCurrentVersion(BA.CurrentVersion);
377if (getCompatibilityVersion().empty())
378setCompatibilityVersion(BA.CompatVersion);
379if (getSwiftABIVersion() == 0)
380setSwiftABIVersion(BA.SwiftABI);
381if (getPath().empty())
382setPath(BA.Path);
383if (!BA.ParentUmbrella.empty())
384addParentUmbrella(Targ, BA.ParentUmbrella);
385for (constauto &Client : BA.AllowableClients)
386addAllowableClient(Client, Targ);
387for (constauto &Lib : BA.RexportedLibraries)
388addReexportedLibrary(Lib, Targ);
389}
390
391staticboolisYAMLTextStub(constFileType &Kind) {
392return (Kind >=FileType::TBD_V1) && (Kind <FileType::TBD_V5);
393}
394
395boolInterfaceFile::operator==(constInterfaceFile &O) const{
396if (Targets != O.Targets)
397returnfalse;
398if (InstallName != O.InstallName)
399returnfalse;
400if ((CurrentVersion != O.CurrentVersion) ||
401 (CompatibilityVersion != O.CompatibilityVersion))
402returnfalse;
403if (SwiftABIVersion != O.SwiftABIVersion)
404returnfalse;
405if (IsTwoLevelNamespace != O.IsTwoLevelNamespace)
406returnfalse;
407if (IsAppExtensionSafe != O.IsAppExtensionSafe)
408returnfalse;
409if (IsOSLibNotForSharedCache != O.IsOSLibNotForSharedCache)
410returnfalse;
411if (HasSimSupport != O.HasSimSupport)
412returnfalse;
413if (ParentUmbrellas != O.ParentUmbrellas)
414returnfalse;
415if (AllowableClients != O.AllowableClients)
416returnfalse;
417if (ReexportedLibraries != O.ReexportedLibraries)
418returnfalse;
419if (*SymbolsSet != *O.SymbolsSet)
420returnfalse;
421// Don't compare run search paths for older filetypes that cannot express
422// them.
423if (!(isYAMLTextStub(FileKind)) && !(isYAMLTextStub(O.FileKind))) {
424if (RPaths != O.RPaths)
425returnfalse;
426if (mapToPlatformVersionSet(Targets) !=mapToPlatformVersionSet(O.Targets))
427returnfalse;
428 }
429
430if (!std::equal(Documents.begin(), Documents.end(), O.Documents.begin(),
431 O.Documents.end(),
432 [](const std::shared_ptr<InterfaceFile>LHS,
433const std::shared_ptr<InterfaceFile>RHS) {
434 return *LHS == *RHS;
435 }))
436returnfalse;
437returntrue;
438}
Sym
Symbol * Sym
Definition:ELF_riscv.cpp:479
isYAMLTextStub
static bool isYAMLTextStub(const FileType &Kind)
Definition:InterfaceFile.cpp:391
InterfaceFile.h
RecordsSlice.h
Implements the TAPI Record Collection Type.
assert
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
TextAPIError.h
Define TAPI specific error codes.
RHS
Value * RHS
Definition:X86PartialReduction.cpp:74
LHS
Value * LHS
Definition:X86PartialReduction.cpp:73
bool
llvm::Expected
Tagged union holding either a T or a Error.
Definition:Error.h:481
llvm::MachO::ArchitectureSet
Definition:ArchitectureSet.h:29
llvm::MachO::ArchitectureSet::All
static ArchitectureSet All()
Definition:ArchitectureSet.h:43
llvm::MachO::ArchitectureSet::clear
ArchitectureSet clear(Architecture Arch)
Definition:ArchitectureSet.h:51
llvm::MachO::ArchitectureSet::has
bool has(Architecture Arch) const
Definition:ArchitectureSet.h:56
llvm::MachO::InterfaceFileRef::addTarget
void addTarget(const Target &Target)
Definition:InterfaceFile.cpp:22
llvm::MachO::InterfaceFile
Defines the interface file.
Definition:InterfaceFile.h:105
llvm::MachO::InterfaceFile::addDocument
void addDocument(std::shared_ptr< InterfaceFile > &&Document)
Add a library for inlining to top level library.
Definition:InterfaceFile.cpp:84
llvm::MachO::InterfaceFile::InterfaceFile
InterfaceFile()
Definition:InterfaceFile.h:110
llvm::MachO::InterfaceFile::getPath
StringRef getPath() const
Get the path from which this file was generated (if applicable).
Definition:InterfaceFile.h:119
llvm::MachO::InterfaceFile::addReexportedLibrary
void addReexportedLibrary(StringRef InstallName, const Target &Target)
Add a re-exported library.
Definition:InterfaceFile.cpp:34
llvm::MachO::InterfaceFile::setPath
void setPath(StringRef Path_)
Set the path from which this file was generated (if applicable).
Definition:InterfaceFile.h:114
llvm::MachO::InterfaceFile::setFromBinaryAttrs
void setFromBinaryAttrs(const RecordsSlice::BinaryAttrs &BA, const Target &Targ)
Set InterfaceFile properties from pre-gathered binary attributes, if they are not set already.
Definition:InterfaceFile.cpp:363
llvm::MachO::InterfaceFile::addParentUmbrella
void addParentUmbrella(const Target &Target_, StringRef Parent)
Set the parent umbrella frameworks.
Definition:InterfaceFile.cpp:42
llvm::MachO::InterfaceFile::targets
const_target_range targets() const
Definition:InterfaceFile.h:170
llvm::MachO::InterfaceFile::setOSLibNotForSharedCache
void setOSLibNotForSharedCache(bool V=true)
Specify if the library is an OS library but not shared cache eligible.
Definition:InterfaceFile.h:214
llvm::MachO::InterfaceFile::isOSLibNotForSharedCache
bool isOSLibNotForSharedCache() const
Check if the library is an OS library that is not shared cache eligible.
Definition:InterfaceFile.h:219
llvm::MachO::InterfaceFile::remove
llvm::Expected< std::unique_ptr< InterfaceFile > > remove(Architecture Arch) const
Remove architecture slice from Interface.
Definition:InterfaceFile.cpp:223
llvm::MachO::InterfaceFile::isTwoLevelNamespace
bool isTwoLevelNamespace() const
Check if the library uses two-level namespace.
Definition:InterfaceFile.h:211
llvm::MachO::InterfaceFile::operator==
bool operator==(const InterfaceFile &O) const
The equality is determined by attributes that impact linking compatibilities.
Definition:InterfaceFile.cpp:395
llvm::MachO::InterfaceFile::getCompatibilityVersion
PackedVersion getCompatibilityVersion() const
Get the compatibility version of the library.
Definition:InterfaceFile.h:199
llvm::MachO::InterfaceFile::addTarget
void addTarget(const Target &Target)
Set and add target.
Definition:InterfaceFile.cpp:72
llvm::MachO::InterfaceFile::isApplicationExtensionSafe
bool isApplicationExtensionSafe() const
Check if the library is application extension safe.
Definition:InterfaceFile.h:225
llvm::MachO::InterfaceFile::rpaths
const std::vector< std::pair< Target, std::string > > & rpaths() const
Get the list of runpath search paths.
Definition:InterfaceFile.h:309
llvm::MachO::InterfaceFile::allowableClients
const std::vector< InterfaceFileRef > & allowableClients() const
Get the list of allowable clients.
Definition:InterfaceFile.h:269
llvm::MachO::InterfaceFile::setInstallName
void setInstallName(StringRef InstallName_)
Set the install name of the library.
Definition:InterfaceFile.h:180
llvm::MachO::InterfaceFile::umbrellas
const std::vector< std::pair< Target, std::string > > & umbrellas() const
Get the list of Parent Umbrella frameworks.
Definition:InterfaceFile.h:250
llvm::MachO::InterfaceFile::reexportedLibraries
const std::vector< InterfaceFileRef > & reexportedLibraries() const
Get the list of re-exported libraries.
Definition:InterfaceFile.h:282
llvm::MachO::InterfaceFile::symbols
const_symbol_range symbols() const
Definition:InterfaceFile.h:363
llvm::MachO::InterfaceFile::setFileType
void setFileType(FileType Kind)
Set the file type.
Definition:InterfaceFile.h:127
llvm::MachO::InterfaceFile::getSwiftABIVersion
uint8_t getSwiftABIVersion() const
Get the Swift ABI version of the library.
Definition:InterfaceFile.h:205
llvm::MachO::InterfaceFile::getCurrentVersion
PackedVersion getCurrentVersion() const
Get the current version of the library.
Definition:InterfaceFile.h:191
llvm::MachO::InterfaceFile::addRPath
void addRPath(StringRef RPath, const Target &InputTarget)
Set the runpath search paths.
Definition:InterfaceFile.cpp:57
llvm::MachO::InterfaceFile::setCompatibilityVersion
void setCompatibilityVersion(PackedVersion Version)
Set the compatibility version of the library.
Definition:InterfaceFile.h:194
llvm::MachO::InterfaceFile::getArchitectures
ArchitectureSet getArchitectures() const
Get the architectures.
Definition:InterfaceFile.h:137
llvm::MachO::InterfaceFile::getInstallName
StringRef getInstallName() const
Get the install name of the library.
Definition:InterfaceFile.h:185
llvm::MachO::InterfaceFile::merge
llvm::Expected< std::unique_ptr< InterfaceFile > > merge(const InterfaceFile *O) const
Merge Interfaces for the same library.
Definition:InterfaceFile.cpp:127
llvm::MachO::InterfaceFile::getFileType
FileType getFileType() const
Get the file type.
Definition:InterfaceFile.h:132
llvm::MachO::InterfaceFile::setApplicationExtensionSafe
void setApplicationExtensionSafe(bool V=true)
Specify if the library is application extension safe (or not).
Definition:InterfaceFile.h:222
llvm::MachO::InterfaceFile::addAllowableClient
void addAllowableClient(StringRef InstallName, const Target &Target)
Add an allowable client.
Definition:InterfaceFile.cpp:26
llvm::MachO::InterfaceFile::inlineLibrary
void inlineLibrary(std::shared_ptr< InterfaceFile > Library, bool Overwrite=false)
Inline reexported library into Interface.
Definition:InterfaceFile.cpp:97
llvm::MachO::InterfaceFile::setSwiftABIVersion
void setSwiftABIVersion(uint8_t Version)
Set the Swift ABI version of the library.
Definition:InterfaceFile.h:202
llvm::MachO::InterfaceFile::setCurrentVersion
void setCurrentVersion(PackedVersion Version)
Set the current version of the library.
Definition:InterfaceFile.h:188
llvm::MachO::InterfaceFile::extract
llvm::Expected< std::unique_ptr< InterfaceFile > > extract(Architecture Arch) const
Extract architecture slice from Interface.
Definition:InterfaceFile.cpp:306
llvm::MachO::InterfaceFile::setTwoLevelNamespace
void setTwoLevelNamespace(bool V=true)
Specify if the library uses two-level namespace (or flat namespace).
Definition:InterfaceFile.h:208
llvm::MachO::Symbol::getFlags
SymbolFlags getFlags() const
Definition:Symbol.h:107
llvm::MachO::Symbol::hasArchitecture
bool hasArchitecture(Architecture Arch) const
Definition:Symbol.h:138
llvm::MachO::Symbol::targets
const_target_range targets() const
Definition:Symbol.h:148
llvm::MachO::Symbol::getArchitectures
ArchitectureSet getArchitectures() const
Definition:Symbol.h:104
llvm::MachO::Symbol::getName
StringRef getName() const
Definition:Symbol.h:103
llvm::MachO::Symbol::getKind
EncodeKind getKind() const
Definition:Symbol.h:102
llvm::MachO::Target
Definition:Target.h:28
llvm::MachO::Target::Arch
Architecture Arch
Definition:Target.h:42
llvm::StringRef
StringRef - Represent a constant reference to a string, i.e.
Definition:StringRef.h:51
llvm::StringRef::empty
constexpr bool empty() const
empty - Check if the string is empty.
Definition:StringRef.h:147
llvm::iterator_range
A range adaptor for a pair of iterators.
Definition:iterator_range.h:42
llvm::MachO
Definition:MachO.h:25
llvm::MachO::FileType
FileType
Defines the file type TextAPI files can represent.
Definition:FileTypes.h:15
llvm::MachO::TBD_V1
@ TBD_V1
Text-based stub file (.tbd) version 1.0.
Definition:FileTypes.h:29
llvm::MachO::TBD_V5
@ TBD_V5
Text-based stub file (.tbd) version 5.0.
Definition:FileTypes.h:41
llvm::MachO::getArchitectureName
StringRef getArchitectureName(Architecture Arch)
Convert an architecture slice to a string.
Definition:Architecture.cpp:42
llvm::MachO::addEntry
C::iterator addEntry(C &Container, StringRef InstallName)
Definition:InterfaceFile.h:453
llvm::MachO::Architecture
Architecture
Defines the architecture slices that are supported by Text-based Stub files.
Definition:Architecture.h:27
llvm::MachO::mapToPlatformVersionSet
PlatformVersionSet mapToPlatformVersionSet(ArrayRef< Target > Targets)
Definition:Target.cpp:55
llvm::MachO::TextAPIErrorCode::NoSuchArchitecture
@ NoSuchArchitecture
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition:AddressRanges.h:18
llvm::inconvertibleErrorCode
std::error_code inconvertibleErrorCode()
The value returned by this function can be returned from convertToErrorCode for Error values where no...
Definition:Error.cpp:98
llvm::SubDirectoryType::Lib
@ Lib
llvm::make_filter_range
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...
Definition:STLExtras.h:573
llvm::lower_bound
auto lower_bound(R &&Range, T &&Value)
Provide wrappers to std::lower_bound which take ranges instead of having to pass begin/end explicitly...
Definition:STLExtras.h:1978
llvm::MachO::RecordsSlice::BinaryAttrs
Definition:RecordsSlice.h:143
llvm::MachO::RecordsSlice::BinaryAttrs::SwiftABI
uint8_t SwiftABI
Definition:RecordsSlice.h:154
llvm::MachO::RecordsSlice::BinaryAttrs::InstallName
StringRef InstallName
Definition:RecordsSlice.h:148
llvm::MachO::RecordsSlice::BinaryAttrs::RexportedLibraries
std::vector< StringRef > RexportedLibraries
Definition:RecordsSlice.h:145
llvm::MachO::RecordsSlice::BinaryAttrs::File
FileType File
Definition:RecordsSlice.h:151
llvm::MachO::RecordsSlice::BinaryAttrs::AllowableClients
std::vector< StringRef > AllowableClients
Definition:RecordsSlice.h:144
llvm::MachO::RecordsSlice::BinaryAttrs::TwoLevelNamespace
bool TwoLevelNamespace
Definition:RecordsSlice.h:155
llvm::MachO::RecordsSlice::BinaryAttrs::CompatVersion
llvm::MachO::PackedVersion CompatVersion
Definition:RecordsSlice.h:153
llvm::MachO::RecordsSlice::BinaryAttrs::CurrentVersion
llvm::MachO::PackedVersion CurrentVersion
Definition:RecordsSlice.h:152
llvm::MachO::RecordsSlice::BinaryAttrs::ParentUmbrella
StringRef ParentUmbrella
Definition:RecordsSlice.h:147
llvm::MachO::RecordsSlice::BinaryAttrs::OSLibNotForSharedCache
bool OSLibNotForSharedCache
Definition:RecordsSlice.h:157
llvm::MachO::RecordsSlice::BinaryAttrs::AppExtensionSafe
bool AppExtensionSafe
Definition:RecordsSlice.h:156
llvm::MachO::RecordsSlice::BinaryAttrs::Path
StringRef Path
Definition:RecordsSlice.h:150

Generated on Fri Jul 18 2025 15:10:23 for LLVM by doxygen 1.9.6
[8]ページ先頭

©2009-2025 Movatter.jp