Add an ELFSymbolRef type.

This allows user code to say Sym.getSize() instead of having to manually fetch
the object.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240708 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola
2015-06-25 22:10:04 +00:00
parent d26d587fbe
commit b24bbb73a7
5 changed files with 63 additions and 20 deletions
+2 -2
View File
@@ -55,8 +55,8 @@ llvm::object::computeSymbolSizes(const ObjectFile &O) {
auto Syms = E->symbols();
if (Syms.begin() == Syms.end())
Syms = E->getDynamicSymbolIterators();
for (SymbolRef Sym : Syms)
Ret.push_back({Sym, E->getSymbolSize(Sym)});
for (ELFSymbolRef Sym : Syms)
Ret.push_back({Sym, Sym.getSize()});
return Ret;
}