mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-03 13:31:05 +00:00
Object/COFF: Change type from a struct to a uint16_t. The struct would be
incorrect for bigendian systems. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142403 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
8c39c9647d
commit
5e3a082c79
@ -45,13 +45,18 @@ struct coff_symbol {
|
||||
support::ulittle32_t Value;
|
||||
support::little16_t SectionNumber;
|
||||
|
||||
struct {
|
||||
support::ulittle8_t BaseType;
|
||||
support::ulittle8_t ComplexType;
|
||||
} Type;
|
||||
support::ulittle16_t Type;
|
||||
|
||||
support::ulittle8_t StorageClass;
|
||||
support::ulittle8_t NumberOfAuxSymbols;
|
||||
|
||||
uint8_t getBaseType() const {
|
||||
return Type & 0x0F;
|
||||
}
|
||||
|
||||
uint8_t getComplexType() const {
|
||||
return (Type & 0xF0) >> 4;
|
||||
}
|
||||
};
|
||||
|
||||
struct coff_section {
|
||||
|
@ -147,7 +147,7 @@ error_code COFFObjectFile::getSymbolType(DataRefImpl Symb,
|
||||
symb->SectionNumber == COFF::IMAGE_SYM_UNDEFINED) {
|
||||
Result = SymbolRef::ST_External;
|
||||
} else {
|
||||
if (symb->Type.ComplexType == COFF::IMAGE_SYM_DTYPE_FUNCTION) {
|
||||
if (symb->getComplexType() == COFF::IMAGE_SYM_DTYPE_FUNCTION) {
|
||||
Result = SymbolRef::ST_Function;
|
||||
} else {
|
||||
char Type;
|
||||
|
Loading…
Reference in New Issue
Block a user