This diff removes the second argument of the method MachOObjectFile::exports.
In all in-tree uses this argument is equal to "this" and
without this argument the interface seems to be cleaner.
Test plan: make check-all
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309462
91177308-0d34-0410-b5e6-
96231b3b80d8
iterator_range<load_command_iterator> load_commands() const;
/// For use iterating over all exported symbols.
- iterator_range<export_iterator> exports(Error &Err,
- const MachOObjectFile *O) const;
+ iterator_range<export_iterator> exports(Error &Err) const;
/// For use examining a trie not in a MachOObjectFile.
static iterator_range<export_iterator> exports(Error &Err,
return make_range(export_iterator(Start), export_iterator(Finish));
}
-iterator_range<export_iterator> MachOObjectFile::exports(Error &Err,
- const MachOObjectFile *O) const {
- return exports(Err, getDyldInfoExportsTrie(), O);
+iterator_range<export_iterator> MachOObjectFile::exports(Error &Err) const {
+ return exports(Err, getDyldInfoExportsTrie(), this);
}
MachORebaseEntry::MachORebaseEntry(Error *E, const MachOObjectFile *O,
HFlags & MachO::MH_NLIST_OUTOFSYNC_WITH_DYLDINFO) {
unsigned ExportsAdded = 0;
Error Err = Error::success();
- for (const llvm::object::ExportEntry &Entry : MachO->exports(Err,
- MachO)) {
+ for (const llvm::object::ExportEntry &Entry : MachO->exports(Err)) {
bool found = false;
bool ReExport = false;
if (!DyldInfoOnly) {
}
}
Error Err = Error::success();
- for (const llvm::object::ExportEntry &Entry : Obj->exports(Err, Obj)) {
+ for (const llvm::object::ExportEntry &Entry : Obj->exports(Err)) {
uint64_t Flags = Entry.flags();
bool ReExport = (Flags & MachO::EXPORT_SYMBOL_FLAGS_REEXPORT);
bool WeakDef = (Flags & MachO::EXPORT_SYMBOL_FLAGS_WEAK_DEFINITION);