mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-19 03:24:09 +00:00
Simplify interface of function that doesn't fail.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238700 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -401,16 +401,13 @@ std::error_code MachOObjectFile::getSymbolAddress(DataRefImpl Symb,
|
||||
return object_error::success;
|
||||
}
|
||||
|
||||
std::error_code MachOObjectFile::getSymbolAlignment(DataRefImpl DRI,
|
||||
uint32_t &Result) const {
|
||||
uint32_t MachOObjectFile::getSymbolAlignment(DataRefImpl DRI) const {
|
||||
uint32_t flags = getSymbolFlags(DRI);
|
||||
if (flags & SymbolRef::SF_Common) {
|
||||
MachO::nlist_base Entry = getSymbolTableEntryBase(this, DRI);
|
||||
Result = 1 << MachO::GET_COMM_ALIGN(Entry.n_desc);
|
||||
} else {
|
||||
Result = 0;
|
||||
return 1 << MachO::GET_COMM_ALIGN(Entry.n_desc);
|
||||
}
|
||||
return object_error::success;
|
||||
return 0;
|
||||
}
|
||||
|
||||
std::error_code MachOObjectFile::getSymbolSize(DataRefImpl DRI,
|
||||
|
Reference in New Issue
Block a user