Change how symbol sizes are handled in lib/Object.
authorRafael Espindola <rafael.espindola@gmail.com>
Wed, 24 Jun 2015 10:20:30 +0000 (10:20 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Wed, 24 Jun 2015 10:20:30 +0000 (10:20 +0000)
commitd7a32ea4b86c04ba0c4736f803527eb393a40867
tree1b09dcd2e51416a33c0b030346842e8ea6dd3e38
parent595348228569c587e14bf8cea1c4fdf1b503c104
Change how symbol sizes are handled in lib/Object.

COFF and MachO only define symbol sizes for common symbols. Reflect that
in the class hierarchy by having a method for common symbols only in the base
and a general one in ELF.

This avoids the need of using a magic value for the size, which had a few
problems
* Most callers didn't check for it.
* The ones that did could not tell the magic value from a file actually having
  that value.

llvm-svn: 240529
19 files changed:
llvm/include/llvm/Object/COFF.h
llvm/include/llvm/Object/ELFObjectFile.h
llvm/include/llvm/Object/MachO.h
llvm/include/llvm/Object/ObjectFile.h
llvm/include/llvm/Object/SymbolicFile.h
llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldCOFF.cpp
llvm/lib/Object/COFFObjectFile.cpp
llvm/lib/Object/MachOObjectFile.cpp
llvm/lib/Object/Object.cpp
llvm/lib/Object/SymbolSize.cpp
llvm/lib/Target/X86/MCTargetDesc/X86ELFRelocationInfo.cpp
llvm/test/Object/X86/nm-print-size.s [new file with mode: 0644]
llvm/test/Object/lit.local.cfg
llvm/tools/dsymutil/MachODebugMapParser.cpp
llvm/tools/llvm-nm/llvm-nm.cpp
llvm/tools/llvm-objdump/MachODump.cpp
llvm/tools/llvm-objdump/llvm-objdump.cpp
llvm/tools/llvm-symbolizer/LLVMSymbolize.cpp