[AIX][XCOFF] add symbol priority for the llvm-objdump -D -symbol-description
authordiggerlin <digger.llvm@gmail.com>
Fri, 29 May 2020 15:08:51 +0000 (11:08 -0400)
committerdiggerlin <digger.llvm@gmail.com>
Fri, 29 May 2020 15:08:51 +0000 (11:08 -0400)
commit34cfed24ebd3a2a9f286877d142a68dbf2c42c96
tree09fc0bc384319b8bc63b1605133c22bf9ec94ec3
parent0384446c7c2458b12ce3ef1c2bdf438af1f78ad7
[AIX][XCOFF] add symbol priority for the llvm-objdump -D -symbol-description

SUMMARY:
when there are two symbol has the same address. llvm-objdump -D -symbol-description will select symbol based on the following rule:

1. using Label first if there is a Label symbol.
2. If there is not Label, using a symbol which has Storage Mapping class.
3. if more than one symbol has storage mapping class, put the TC0 has the low priority, for other storage mapping class , compare based on the value.

Reviewers: James Henderson ,hubert.reinterpretcast,

Differential Revision: https://reviews.llvm.org/D78387
llvm/include/llvm/MC/MCDisassembler/MCDisassembler.h
llvm/lib/MC/MCDisassembler/MCDisassembler.cpp
llvm/test/tools/llvm-objdump/XCOFF/disassemble-symbol-description.test
llvm/unittests/MC/CMakeLists.txt
llvm/unittests/MC/MCDisassemblerTest.cpp [new file with mode: 0644]