diff options
Diffstat (limited to 'contrib/llvm-project/llvm/include/llvm/TextAPI/RecordsSlice.h')
-rw-r--r-- | contrib/llvm-project/llvm/include/llvm/TextAPI/RecordsSlice.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/contrib/llvm-project/llvm/include/llvm/TextAPI/RecordsSlice.h b/contrib/llvm-project/llvm/include/llvm/TextAPI/RecordsSlice.h index 8d733fd797ec..0f9e3fad1a30 100644 --- a/contrib/llvm-project/llvm/include/llvm/TextAPI/RecordsSlice.h +++ b/contrib/llvm-project/llvm/include/llvm/TextAPI/RecordsSlice.h @@ -14,11 +14,11 @@ #ifndef LLVM_TEXTAPI_RECORDSLICE_H #define LLVM_TEXTAPI_RECORDSLICE_H -#include "llvm/ADT/MapVector.h" #include "llvm/Support/Allocator.h" #include "llvm/TextAPI/InterfaceFile.h" #include "llvm/TextAPI/PackedVersion.h" #include "llvm/TextAPI/Record.h" +#include "llvm/TextAPI/RecordVisitor.h" namespace llvm { namespace MachO { @@ -133,6 +133,9 @@ public: Categories.empty(); } + // Visit all records known to RecordsSlice. + void visit(RecordVisitor &V) const; + struct BinaryAttrs { std::vector<StringRef> AllowableClients; std::vector<StringRef> RexportedLibraries; @@ -174,6 +177,12 @@ private: R->Linkage = std::max(R->Linkage, L); } + /// Update set flags of requested record. + /// + /// \param R The global record to update. + /// \param F Flags to update to. + void updateFlags(GlobalRecord *R, SymbolFlags F) { R->Flags = F; } + RecordMap<GlobalRecord> Globals; RecordMap<ObjCInterfaceRecord> Classes; RecordMap<ObjCCategoryRecord, std::pair<StringRef, StringRef>> Categories; @@ -181,6 +190,9 @@ private: std::unique_ptr<BinaryAttrs> BA{nullptr}; }; +using Records = llvm::SmallVector<std::shared_ptr<RecordsSlice>, 4>; +std::unique_ptr<InterfaceFile> convertToInterfaceFile(const Records &Slices); + } // namespace MachO } // namespace llvm #endif // LLVM_TEXTAPI_RECORDSLICE_H |