mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-17 04:24:00 +00:00
Use the information provided by getFlags to unify some code in llvm-nm.
It is not clear how much we should try to expose in getFlags. For example, should there be a SF_Object and a SF_Text? But for information that is already being exposed, we may as well use it in llvm-nm. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200820 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -161,9 +161,13 @@ uint32_t COFFObjectFile::getSymbolFlags(DataRefImpl Ref) const {
|
||||
|
||||
// TODO: Correctly set SF_FormatSpecific, SF_Common
|
||||
|
||||
if (Symb->StorageClass == COFF::IMAGE_SYM_CLASS_EXTERNAL &&
|
||||
Symb->SectionNumber == COFF::IMAGE_SYM_UNDEFINED)
|
||||
Result |= SymbolRef::SF_Undefined;
|
||||
if (Symb->SectionNumber == COFF::IMAGE_SYM_UNDEFINED) {
|
||||
if (Symb->Value == 0)
|
||||
Result |= SymbolRef::SF_Undefined;
|
||||
else
|
||||
Result |= SymbolRef::SF_Common;
|
||||
}
|
||||
|
||||
|
||||
// TODO: This are certainly too restrictive.
|
||||
if (Symb->StorageClass == COFF::IMAGE_SYM_CLASS_EXTERNAL)
|
||||
|
Reference in New Issue
Block a user