Add a SymbolicFile interface between Binary and ObjectFile.
This interface allows IRObjectFile to be implemented without having dummy
methods for all section and segment related methods.
Both llvm-ar and llvm-nm are changed to use it. Unfortunately the mangler is
still not plugged in since it requires some refactoring to make a Module hold
a DataLayout.
llvm-svn: 201881
diff --git a/llvm/lib/Object/COFFObjectFile.cpp b/llvm/lib/Object/COFFObjectFile.cpp
index 5dcb174..ed5494d 100644
--- a/llvm/lib/Object/COFFObjectFile.cpp
+++ b/llvm/lib/Object/COFFObjectFile.cpp
@@ -549,17 +549,17 @@
EC = object_error::success;
}
-symbol_iterator COFFObjectFile::symbol_begin() const {
+basic_symbol_iterator COFFObjectFile::symbol_begin_impl() const {
DataRefImpl Ret;
Ret.p = reinterpret_cast<uintptr_t>(SymbolTable);
- return symbol_iterator(SymbolRef(Ret, this));
+ return basic_symbol_iterator(SymbolRef(Ret, this));
}
-symbol_iterator COFFObjectFile::symbol_end() const {
+basic_symbol_iterator COFFObjectFile::symbol_end_impl() const {
// The symbol table ends where the string table begins.
DataRefImpl Ret;
Ret.p = reinterpret_cast<uintptr_t>(StringTable);
- return symbol_iterator(SymbolRef(Ret, this));
+ return basic_symbol_iterator(SymbolRef(Ret, this));
}
library_iterator COFFObjectFile::needed_library_begin() const {
@@ -832,8 +832,8 @@
return toSymb(It->getRawDataRefImpl());
}
-const coff_relocation *COFFObjectFile::getCOFFRelocation(
- relocation_iterator &It) const {
+const coff_relocation *
+COFFObjectFile::getCOFFRelocation(relocation_iterator &It) const {
return toRel(It->getRawDataRefImpl());
}