summaryrefslogtreecommitdiff
path: root/llvm/lib/TextAPI/Symbol.cpp
AgeCommit message (Collapse)Author
2024-01-29[TextAPI] Introduce granularity for handling ObjC Interface symbols (#79928)Cyndy Ishida
ObjCInterfaceRecords roughly align to the objc-classes key in tbd-files. They condensely represent up to 3 symbols. The problem here is that when represented this way, we lose granularity when these symbols could have different linkages or outright don't exist. This can happen frequently in interoptable code generated by the swift compiler. This adds fields and utility functions to express unique properties for these symbols. If the record does represent the same properties across all of its symbols, it will be treated the same in the TBD. Otherwise it will be printed in global's section. Reviewed seperately before by Juergen Ributzka
2024-01-26[TextAPI] Rename SymbolKind to EncodeKind (#79622)Cyndy Ishida
A distinction that doesn't _usually_ matter is that the MachO::SymbolKind is really a mapping of entries in TBD files not symbols. To better understand this, rename the enum so it represents an encoding mapped to TBDs as opposed to symbols alone. For example, it can be a bit confusing that "GlobalSymbol" is a enum value when all of those values can represent a GlobalSymbol.
2023-12-11[llvm] Use StringRef::{starts,ends}_with (NFC) (#74956)Kazu Hirata
This patch replaces uses of StringRef::{starts,ends}with with StringRef::{starts,ends}_with for consistency with std::{string,string_view}::{starts,ends}_with in C++20. I'm planning to deprecate and eventually remove StringRef::{starts,ends}with.
2023-12-02[TextAPI] Introduce Records & RecordSlice Types (#74115)Cyndy Ishida
`Record`'s hold target triple specific information about APIs and symbols. This holds information about the relationship between ObjC symbols and their linkage properties. It will be used to compare and run significant operations between the frontend representation of symbols in AST and symbol information extracted from Mach-O binaries. This differs from the lighter weight Symbol and SymbolSet class where they are deduplicated across targets and only represent exported symbols, that class is mostly used for serializing.
2023-07-24[TextAPI] Introduce SymbolSetCyndy Ishida
SymbolSet is a structure that acts as a simple container class for exported symbols that belong to a library interface. It allows tapi to decouple the globals from the other library attributes. It's uniqued by symbol name and `kind`, which all contain their assigned target triples. Reviewed By: zixuw Differential Revision: https://reviews.llvm.org/D149860
2023-02-22[TextAPI] Add support for TBDv5 Files to nm & tapi-diffCyndy Ishida
This includes handling of new attributes for symbols & rpath. In the event that an older format file is compared to tbd_v5, ignore these new attributes. Reviewed By: ributzka Differential Revision: https://reviews.llvm.org/D144529
2021-04-05[TextAPI] move source code files out of subdirectory, NFCCyndy Ishida
TextAPI/ELF has moved out into InterfaceStubs, so theres no longer a need to seperate out TextAPI between formats. Reviewed By: ributzka, int3, #lld-macho Differential Revision: https://reviews.llvm.org/D99811