public:
COFFObjectFile(MemoryBufferRef Object, std::error_code &EC);
- basic_symbol_iterator symbol_begin_impl() const override;
- basic_symbol_iterator symbol_end_impl() const override;
+ basic_symbol_iterator symbol_begin() const override;
+ basic_symbol_iterator symbol_end() const override;
section_iterator section_begin() const override;
section_iterator section_end() const override;
return SymbolRef::SF_Global;
}
- basic_symbol_iterator symbol_begin_impl() const override {
+ basic_symbol_iterator symbol_begin() const override {
return BasicSymbolRef(DataRefImpl(), this);
}
- basic_symbol_iterator symbol_end_impl() const override {
+ basic_symbol_iterator symbol_end() const override {
DataRefImpl Symb;
Symb.p = isCode() ? 2 : 1;
return BasicSymbolRef(Symb, this);
return reinterpret_cast<const Elf_Shdr *>(Sec.p);
}
- basic_symbol_iterator symbol_begin_impl() const override;
- basic_symbol_iterator symbol_end_impl() const override;
+ basic_symbol_iterator symbol_begin() const override;
+ basic_symbol_iterator symbol_end() const override;
elf_symbol_iterator dynamic_symbol_begin() const;
elf_symbol_iterator dynamic_symbol_end() const;
}
template <class ELFT>
-basic_symbol_iterator ELFObjectFile<ELFT>::symbol_begin_impl() const {
+basic_symbol_iterator ELFObjectFile<ELFT>::symbol_begin() const {
DataRefImpl Sym = toDRI(DotSymtabSec, 0);
return basic_symbol_iterator(SymbolRef(Sym, this));
}
template <class ELFT>
-basic_symbol_iterator ELFObjectFile<ELFT>::symbol_end_impl() const {
+basic_symbol_iterator ELFObjectFile<ELFT>::symbol_end() const {
const Elf_Shdr *SymTab = DotSymtabSec;
if (!SymTab)
- return symbol_begin_impl();
+ return symbol_begin();
DataRefImpl Sym = toDRI(SymTab, SymTab->sh_size / sizeof(Elf_Sym));
return basic_symbol_iterator(SymbolRef(Sym, this));
}
const GlobalValue *getSymbolGV(DataRefImpl Symb) const {
return const_cast<IRObjectFile *>(this)->getSymbolGV(Symb);
}
- basic_symbol_iterator symbol_begin_impl() const override;
- basic_symbol_iterator symbol_end_impl() const override;
+ basic_symbol_iterator symbol_begin() const override;
+ basic_symbol_iterator symbol_end() const override;
const Module &getModule() const {
return const_cast<IRObjectFile*>(this)->getModule();
// TODO: Would be useful to have an iterator based version
// of the load command interface too.
- basic_symbol_iterator symbol_begin_impl() const override;
- basic_symbol_iterator symbol_end_impl() const override;
+ basic_symbol_iterator symbol_begin() const override;
+ basic_symbol_iterator symbol_end() const override;
// MachO specific.
basic_symbol_iterator getSymbolByIndex(unsigned Index) const;
llvm_unreachable("not implemented");
return 0;
}
- basic_symbol_iterator symbol_begin_impl() const override {
+ basic_symbol_iterator symbol_begin() const override {
llvm_unreachable("not implemented");
return basic_symbol_iterator(BasicSymbolRef());
}
- basic_symbol_iterator symbol_end_impl() const override {
+ basic_symbol_iterator symbol_end() const override {
llvm_unreachable("not implemented");
return basic_symbol_iterator(BasicSymbolRef());
}
virtual uint32_t getSymbolFlags(DataRefImpl Symb) const = 0;
- virtual basic_symbol_iterator symbol_begin_impl() const = 0;
+ virtual basic_symbol_iterator symbol_begin() const = 0;
- virtual basic_symbol_iterator symbol_end_impl() const = 0;
+ virtual basic_symbol_iterator symbol_end() const = 0;
// convenience wrappers.
- basic_symbol_iterator symbol_begin() const {
- return symbol_begin_impl();
- }
- basic_symbol_iterator symbol_end() const {
- return symbol_end_impl();
- }
typedef iterator_range<basic_symbol_iterator> basic_symbol_iterator_range;
basic_symbol_iterator_range symbols() const {
return basic_symbol_iterator_range(symbol_begin(), symbol_end());
EC = std::error_code();
}
-basic_symbol_iterator COFFObjectFile::symbol_begin_impl() const {
+basic_symbol_iterator COFFObjectFile::symbol_begin() const {
DataRefImpl Ret;
Ret.p = getSymbolTable();
return basic_symbol_iterator(SymbolRef(Ret, this));
}
-basic_symbol_iterator COFFObjectFile::symbol_end_impl() const {
+basic_symbol_iterator COFFObjectFile::symbol_end() const {
// The symbol table ends where the string table begins.
DataRefImpl Ret;
Ret.p = reinterpret_cast<uintptr_t>(StringTable);
std::unique_ptr<Module> IRObjectFile::takeModule() { return std::move(M); }
-basic_symbol_iterator IRObjectFile::symbol_begin_impl() const {
+basic_symbol_iterator IRObjectFile::symbol_begin() const {
Module::const_iterator I = M->begin();
DataRefImpl Ret;
Ret.p = skipEmpty(I, *M);
return basic_symbol_iterator(BasicSymbolRef(Ret, this));
}
-basic_symbol_iterator IRObjectFile::symbol_end_impl() const {
+basic_symbol_iterator IRObjectFile::symbol_end() const {
DataRefImpl Ret;
uint64_t NumAsm = AsmSymbols.size();
NumAsm <<= 2;
return section_iterator(SectionRef(Sec, this));
}
-basic_symbol_iterator MachOObjectFile::symbol_begin_impl() const {
+basic_symbol_iterator MachOObjectFile::symbol_begin() const {
DataRefImpl DRI;
MachO::symtab_command Symtab = getSymtabLoadCommand();
if (!SymtabLoadCmd || Symtab.nsyms == 0)
return getSymbolByIndex(0);
}
-basic_symbol_iterator MachOObjectFile::symbol_end_impl() const {
+basic_symbol_iterator MachOObjectFile::symbol_end() const {
DataRefImpl DRI;
MachO::symtab_command Symtab = getSymtabLoadCommand();
if (!SymtabLoadCmd || Symtab.nsyms == 0)