1414#ifndef LLVM_TEXTAPI_INTERFACEFILE_H
1515#define LLVM_TEXTAPI_INTERFACEFILE_H
1616
17+ #include " llvm/Support/Compiler.h"
1718#include " llvm/ADT/Hashing.h"
1819#include " llvm/ADT/StringRef.h"
1920#include " llvm/ADT/iterator.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,7 @@ 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, const Target &Target);
278279
279280 // / Get the list of re-exported libraries.
280281 // /
@@ -286,7 +287,7 @@ class InterfaceFile {
286287 // / Add a library for inlining to top level library.
287288 // /
288289 // /\param Document The library to inline with top level library.
289- void addDocument (std::shared_ptr<InterfaceFile> &&Document);
290+ LLVM_ABI void addDocument (std::shared_ptr<InterfaceFile> &&Document);
290291
291292 // / Returns the pointer to parent document if exists or nullptr otherwise.
292293 InterfaceFile *getParent () const { return Parent; }
@@ -301,7 +302,7 @@ class InterfaceFile {
301302 // / Set the runpath search paths.
302303 // / \param RPath The name of runpath.
303304 // / \param InputTarget The target applicable to runpath search path.
304- void addRPath (StringRef RPath, const Target &InputTarget);
305+ LLVM_ABI void addRPath (StringRef RPath, const Target &InputTarget);
305306
306307 // / Get the list of runpath search paths.
307308 // /
@@ -373,14 +374,14 @@ class InterfaceFile {
373374 // /
374375 // / \param Arch architecture to extract from.
375376 // / \return New InterfaceFile with extracted architecture slice.
376- llvm::Expected<std::unique_ptr<InterfaceFile>>
377+ LLVM_ABI llvm::Expected<std::unique_ptr<InterfaceFile>>
377378 extract (Architecture Arch) const ;
378379
379380 // / Remove architecture slice from Interface.
380381 // /
381382 // / \param Arch architecture to remove.
382383 // / \return New Interface File with removed architecture slice.
383- llvm::Expected<std::unique_ptr<InterfaceFile>>
384+ LLVM_ABI llvm::Expected<std::unique_ptr<InterfaceFile>>
384385 remove (Architecture Arch) const ;
385386
386387 // / Merge Interfaces for the same library. The following library attributes
@@ -390,29 +391,29 @@ class InterfaceFile {
390391 // /
391392 // / \param O The Interface to merge.
392393 // / \return New Interface File that was merged.
393- llvm::Expected<std::unique_ptr<InterfaceFile>>
394+ LLVM_ABI llvm::Expected<std::unique_ptr<InterfaceFile>>
394395 merge (const InterfaceFile *O) const ;
395396
396397 // / Inline reexported library into Interface.
397398 // /
398399 // / \param Library Interface of reexported library.
399400 // / \param Overwrite Whether to overwrite preexisting inlined library.
400- void inlineLibrary (std::shared_ptr<InterfaceFile> Library,
401+ LLVM_ABI void inlineLibrary (std::shared_ptr<InterfaceFile> Library,
401402 bool Overwrite = false );
402403
403404 // / Set InterfaceFile properties from pre-gathered binary attributes,
404405 // / if they are not set already.
405406 // /
406407 // / \param BA Attributes typically represented in load commands.
407408 // / \param Targ MachO Target slice to add attributes to.
408- void setFromBinaryAttrs (const RecordsSlice::BinaryAttrs &BA,
409+ LLVM_ABI void setFromBinaryAttrs (const RecordsSlice::BinaryAttrs &BA,
409410 const Target &Targ);
410411
411412 // / The equality is determined by attributes that impact linking
412413 // / compatibilities. Path, & FileKind are irrelevant since these by
413414 // / itself should not impact linking.
414415 // / This is an expensive operation.
415- bool operator ==(const InterfaceFile &O) const ;
416+ LLVM_ABI bool operator ==(const InterfaceFile &O) const ;
416417
417418 bool operator !=(const InterfaceFile &O) const { return !(*this == O); }
418419
0 commit comments