1818#include " llvm/ADT/StringRef.h"
1919#include " llvm/ADT/iterator.h"
2020#include " llvm/Support/Allocator.h"
21+ #include " llvm/Support/Compiler.h"
2122#include " llvm/TextAPI/ArchitectureSet.h"
2223#include " llvm/TextAPI/FileTypes.h"
2324#include " llvm/TextAPI/PackedVersion.h"
@@ -60,7 +61,7 @@ class InterfaceFileRef {
6061
6162 StringRef getInstallName () const { return InstallName; };
6263
63- void addTarget (const Target &Target);
64+ LLVM_ABI void addTarget (const Target &Target);
6465 template <typename RangeT> void addTargets (RangeT &&Targets) {
6566 for (const auto &Target : Targets)
6667 addTarget (Target (Target));
@@ -146,7 +147,7 @@ class InterfaceFile {
146147 // / Set and add target.
147148 // /
148149 // / \param Target the target to add into.
149- void addTarget (const Target &Target);
150+ LLVM_ABI void addTarget (const Target &Target);
150151
151152 // / Determine if target triple slice exists in file.
152153 // /
@@ -174,7 +175,7 @@ class InterfaceFile {
174175 std::function<bool (const Target &)>>;
175176 using const_filtered_target_range =
176177 llvm::iterator_range<const_filtered_target_iterator>;
177- const_filtered_target_range targets (ArchitectureSet Archs) const ;
178+ LLVM_ABI const_filtered_target_range targets (ArchitectureSet Archs) const ;
178179
179180 // / Set the install name of the library.
180181 void setInstallName (StringRef InstallName_) {
@@ -241,7 +242,7 @@ class InterfaceFile {
241242 // / Set the parent umbrella frameworks.
242243 // / \param Target_ The target applicable to Parent
243244 // / \param Parent The name of Parent
244- void addParentUmbrella (const Target &Target_, StringRef Parent);
245+ LLVM_ABI void addParentUmbrella (const Target &Target_, StringRef Parent);
245246
246247 // / Get the list of Parent Umbrella frameworks.
247248 // /
@@ -261,7 +262,7 @@ class InterfaceFile {
261262 // / \param InstallName The name of the client that is allowed to link this
262263 // / library.
263264 // / \param Target The target triple for which this applies.
264- void addAllowableClient (StringRef InstallName, const Target &Target);
265+ LLVM_ABI void addAllowableClient (StringRef InstallName, const Target &Target);
265266
266267 // / Get the list of allowable clients.
267268 // /
@@ -274,7 +275,8 @@ class InterfaceFile {
274275 // /
275276 // / \param InstallName The name of the library to re-export.
276277 // / \param Target The target triple for which this applies.
277- void addReexportedLibrary (StringRef InstallName, const Target &Target);
278+ LLVM_ABI void addReexportedLibrary (StringRef InstallName,
279+ const Target &Target);
278280
279281 // / Get the list of re-exported libraries.
280282 // /
@@ -286,7 +288,7 @@ class InterfaceFile {
286288 // / Add a library for inlining to top level library.
287289 // /
288290 // /\param Document The library to inline with top level library.
289- void addDocument (std::shared_ptr<InterfaceFile> &&Document);
291+ LLVM_ABI void addDocument (std::shared_ptr<InterfaceFile> &&Document);
290292
291293 // / Returns the pointer to parent document if exists or nullptr otherwise.
292294 InterfaceFile *getParent () const { return Parent; }
@@ -301,7 +303,7 @@ class InterfaceFile {
301303 // / Set the runpath search paths.
302304 // / \param RPath The name of runpath.
303305 // / \param InputTarget The target applicable to runpath search path.
304- void addRPath (StringRef RPath, const Target &InputTarget);
306+ LLVM_ABI void addRPath (StringRef RPath, const Target &InputTarget);
305307
306308 // / Get the list of runpath search paths.
307309 // /
@@ -373,14 +375,14 @@ class InterfaceFile {
373375 // /
374376 // / \param Arch architecture to extract from.
375377 // / \return New InterfaceFile with extracted architecture slice.
376- llvm::Expected<std::unique_ptr<InterfaceFile>>
378+ LLVM_ABI llvm::Expected<std::unique_ptr<InterfaceFile>>
377379 extract (Architecture Arch) const ;
378380
379381 // / Remove architecture slice from Interface.
380382 // /
381383 // / \param Arch architecture to remove.
382384 // / \return New Interface File with removed architecture slice.
383- llvm::Expected<std::unique_ptr<InterfaceFile>>
385+ LLVM_ABI llvm::Expected<std::unique_ptr<InterfaceFile>>
384386 remove (Architecture Arch) const ;
385387
386388 // / Merge Interfaces for the same library. The following library attributes
@@ -390,29 +392,29 @@ class InterfaceFile {
390392 // /
391393 // / \param O The Interface to merge.
392394 // / \return New Interface File that was merged.
393- llvm::Expected<std::unique_ptr<InterfaceFile>>
395+ LLVM_ABI llvm::Expected<std::unique_ptr<InterfaceFile>>
394396 merge (const InterfaceFile *O) const ;
395397
396398 // / Inline reexported library into Interface.
397399 // /
398400 // / \param Library Interface of reexported library.
399401 // / \param Overwrite Whether to overwrite preexisting inlined library.
400- void inlineLibrary (std::shared_ptr<InterfaceFile> Library,
401- bool Overwrite = false );
402+ LLVM_ABI void inlineLibrary (std::shared_ptr<InterfaceFile> Library,
403+ bool Overwrite = false );
402404
403405 // / Set InterfaceFile properties from pre-gathered binary attributes,
404406 // / if they are not set already.
405407 // /
406408 // / \param BA Attributes typically represented in load commands.
407409 // / \param Targ MachO Target slice to add attributes to.
408- void setFromBinaryAttrs (const RecordsSlice::BinaryAttrs &BA,
409- const Target &Targ);
410+ LLVM_ABI void setFromBinaryAttrs (const RecordsSlice::BinaryAttrs &BA,
411+ const Target &Targ);
410412
411413 // / The equality is determined by attributes that impact linking
412414 // / compatibilities. Path, & FileKind are irrelevant since these by
413415 // / itself should not impact linking.
414416 // / This is an expensive operation.
415- bool operator ==(const InterfaceFile &O) const ;
417+ LLVM_ABI bool operator ==(const InterfaceFile &O) const ;
416418
417419 bool operator !=(const InterfaceFile &O) const { return !(*this == O); }
418420
0 commit comments