Update MachOObjectFile::getSymbolAddress so it returns UnknownAddressOrSize
authorKevin Enderby <enderby@apple.com>
Tue, 20 May 2014 23:04:47 +0000 (23:04 +0000)
committerKevin Enderby <enderby@apple.com>
Tue, 20 May 2014 23:04:47 +0000 (23:04 +0000)
commitb38059ab25cdabc9bcf4819cd82ab5955e8d3e3e
tree0dbfaadf07612e99198e0c0499bb34f112856532
parentacf621545dace3f78904072f88fb05dd983dab2e
Update MachOObjectFile::getSymbolAddress so it returns UnknownAddressOrSize
for undefined symbols, so it matches what COFFObjectFile::getSymbolAddress
does.  This allows llvm-nm to print spaces instead of 0’s for the value
of undefined symbols in Mach-O files.

To make this change other uses of MachOObjectFile::getSymbolAddress
are updated to handle when the Value is returned as UnknownAddressOrSize.
Which is needed to keep two of the ExecutionEngine tests working for example.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209253 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Object/MachOObjectFile.cpp
test/Object/nm-trivial-object.test
test/Object/nm-universal-binary.test