mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-01 15:11:24 +00:00
Reduce nesting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199418 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
671a9e2ce0
commit
6846082281
@ -145,21 +145,19 @@ error_code COFFObjectFile::getSymbolType(DataRefImpl Ref,
|
||||
if (Symb->StorageClass == COFF::IMAGE_SYM_CLASS_EXTERNAL &&
|
||||
Symb->SectionNumber == COFF::IMAGE_SYM_UNDEFINED) {
|
||||
Result = SymbolRef::ST_Unknown;
|
||||
} else if (Symb->getComplexType() == COFF::IMAGE_SYM_DTYPE_FUNCTION) {
|
||||
Result = SymbolRef::ST_Function;
|
||||
} else {
|
||||
if (Symb->getComplexType() == COFF::IMAGE_SYM_DTYPE_FUNCTION) {
|
||||
Result = SymbolRef::ST_Function;
|
||||
} else {
|
||||
uint32_t Characteristics = 0;
|
||||
if (Symb->SectionNumber > 0) {
|
||||
const coff_section *Section = NULL;
|
||||
if (error_code EC = getSection(Symb->SectionNumber, Section))
|
||||
return EC;
|
||||
Characteristics = Section->Characteristics;
|
||||
}
|
||||
if (Characteristics & COFF::IMAGE_SCN_MEM_READ &&
|
||||
~Characteristics & COFF::IMAGE_SCN_MEM_WRITE) // Read only.
|
||||
Result = SymbolRef::ST_Data;
|
||||
uint32_t Characteristics = 0;
|
||||
if (Symb->SectionNumber > 0) {
|
||||
const coff_section *Section = NULL;
|
||||
if (error_code EC = getSection(Symb->SectionNumber, Section))
|
||||
return EC;
|
||||
Characteristics = Section->Characteristics;
|
||||
}
|
||||
if (Characteristics & COFF::IMAGE_SCN_MEM_READ &&
|
||||
~Characteristics & COFF::IMAGE_SCN_MEM_WRITE) // Read only.
|
||||
Result = SymbolRef::ST_Data;
|
||||
}
|
||||
return object_error::success;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user