mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-17 20:23:59 +00:00
Use getValue instead of getAddress in a few MachO only cases.
In MachO the value of the symbol is always the address, so we can use the simpler function. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241364 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -392,9 +392,7 @@ uint32_t MachOObjectFile::getSymbolAlignment(DataRefImpl DRI) const {
|
||||
}
|
||||
|
||||
uint64_t MachOObjectFile::getCommonSymbolSizeImpl(DataRefImpl DRI) const {
|
||||
uint64_t Value;
|
||||
getSymbolAddress(DRI, Value);
|
||||
return Value;
|
||||
return getSymbolValue(DRI);
|
||||
}
|
||||
|
||||
SymbolRef::Type MachOObjectFile::getSymbolType(DataRefImpl Symb) const {
|
||||
@ -434,8 +432,7 @@ uint32_t MachOObjectFile::getSymbolFlags(DataRefImpl DRI) const {
|
||||
if (MachOType & MachO::N_EXT) {
|
||||
Result |= SymbolRef::SF_Global;
|
||||
if ((MachOType & MachO::N_TYPE) == MachO::N_UNDF) {
|
||||
uint64_t Value;
|
||||
getSymbolAddress(DRI, Value);
|
||||
uint64_t Value = getSymbolValue(DRI);
|
||||
if (Value && Value != UnknownAddress)
|
||||
Result |= SymbolRef::SF_Common;
|
||||
}
|
||||
|
Reference in New Issue
Block a user