forked from OSchip/llvm-project
[llvm] Update MachOObjectFile::exports interface
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 llvm-svn: 309462
This commit is contained in:
parent
4fb45077c4
commit
e574034f28
|
@ -365,8 +365,7 @@ public:
|
|||
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,
|
||||
|
|
|
@ -2908,9 +2908,8 @@ MachOObjectFile::exports(Error &E, ArrayRef<uint8_t> Trie,
|
|||
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,
|
||||
|
|
|
@ -1227,8 +1227,7 @@ dumpSymbolNamesFromObject(SymbolicFile &Obj, bool printName,
|
|||
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) {
|
||||
|
|
|
@ -9403,7 +9403,7 @@ void llvm::printMachOExportsTrie(const object::MachOObjectFile *Obj) {
|
|||
}
|
||||
}
|
||||
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);
|
||||
|
|
Loading…
Reference in New Issue