mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-03-04 21:31:03 +00:00
Simplify, NFC.
In these two contexts we really just want the raw n_value. No need to use getSymbolValue which checks for special cases where, semantically, the symbol has no value. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241584 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
2822246ece
commit
6b24d0a9a7
@ -390,7 +390,7 @@ uint32_t MachOObjectFile::getSymbolAlignment(DataRefImpl DRI) const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
uint64_t MachOObjectFile::getCommonSymbolSizeImpl(DataRefImpl DRI) const {
|
uint64_t MachOObjectFile::getCommonSymbolSizeImpl(DataRefImpl DRI) const {
|
||||||
return getSymbolValue(DRI);
|
return getNValue(DRI);
|
||||||
}
|
}
|
||||||
|
|
||||||
SymbolRef::Type MachOObjectFile::getSymbolType(DataRefImpl Symb) const {
|
SymbolRef::Type MachOObjectFile::getSymbolType(DataRefImpl Symb) const {
|
||||||
@ -430,8 +430,7 @@ uint32_t MachOObjectFile::getSymbolFlags(DataRefImpl DRI) const {
|
|||||||
if (MachOType & MachO::N_EXT) {
|
if (MachOType & MachO::N_EXT) {
|
||||||
Result |= SymbolRef::SF_Global;
|
Result |= SymbolRef::SF_Global;
|
||||||
if ((MachOType & MachO::N_TYPE) == MachO::N_UNDF) {
|
if ((MachOType & MachO::N_TYPE) == MachO::N_UNDF) {
|
||||||
uint64_t Value = getSymbolValue(DRI);
|
if (getNValue(DRI))
|
||||||
if (Value && Value != UnknownAddress)
|
|
||||||
Result |= SymbolRef::SF_Common;
|
Result |= SymbolRef::SF_Common;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user