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)
commit821b06f3a88085a4aefa205e83451bdf718bfe4a
tree37054c90ec4108a039caeb2c59a6641e9527f194
parent9ece8eb9456421244dbf894676848574f21b401f
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240529 91177308-0d34-0410-b5e6-96231b3b80d8
19 files changed:
include/llvm/Object/COFF.h
include/llvm/Object/ELFObjectFile.h
include/llvm/Object/MachO.h
include/llvm/Object/ObjectFile.h
include/llvm/Object/SymbolicFile.h
lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
lib/ExecutionEngine/RuntimeDyld/RuntimeDyldCOFF.cpp
lib/Object/COFFObjectFile.cpp
lib/Object/MachOObjectFile.cpp
lib/Object/Object.cpp
lib/Object/SymbolSize.cpp
lib/Target/X86/MCTargetDesc/X86ELFRelocationInfo.cpp
test/Object/X86/nm-print-size.s [new file with mode: 0644]
test/Object/lit.local.cfg
tools/dsymutil/MachODebugMapParser.cpp
tools/llvm-nm/llvm-nm.cpp
tools/llvm-objdump/MachODump.cpp
tools/llvm-objdump/llvm-objdump.cpp
tools/llvm-symbolizer/LLVMSymbolize.cpp