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

View File

@ -1149,8 +1149,8 @@ void llvm::PrintSymbolTable(const ObjectFile *o) {
outs() << '\t';
if (Common || isa<ELFObjectFileBase>(o)) {
uint64_t Val = Common ? Symbol.getAlignment()
: cast<ELFObjectFileBase>(o)->getSymbolSize(Symbol);
uint64_t Val =
Common ? Symbol.getAlignment() : ELFSymbolRef(Symbol).getSize();
outs() << format("\t %08" PRIx64 " ", Val);
}