mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-17 05:25:47 +00:00
Simplify getSymbolFlags.
None of the object formats require extra parsing to compute these flags, so the method cannot fail. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200574 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -155,10 +155,9 @@ error_code COFFObjectFile::getSymbolType(DataRefImpl Ref,
|
||||
return object_error::success;
|
||||
}
|
||||
|
||||
error_code COFFObjectFile::getSymbolFlags(DataRefImpl Ref,
|
||||
uint32_t &Result) const {
|
||||
uint32_t COFFObjectFile::getSymbolFlags(DataRefImpl Ref) const {
|
||||
const coff_symbol *Symb = toSymb(Ref);
|
||||
Result = SymbolRef::SF_None;
|
||||
uint32_t Result = SymbolRef::SF_None;
|
||||
|
||||
// TODO: Correctly set SF_FormatSpecific, SF_ThreadLocal, SF_Common
|
||||
|
||||
@@ -176,7 +175,7 @@ error_code COFFObjectFile::getSymbolFlags(DataRefImpl Ref,
|
||||
if (Symb->SectionNumber == COFF::IMAGE_SYM_ABSOLUTE)
|
||||
Result |= SymbolRef::SF_Absolute;
|
||||
|
||||
return object_error::success;
|
||||
return Result;
|
||||
}
|
||||
|
||||
error_code COFFObjectFile::getSymbolSize(DataRefImpl Ref,
|
||||
|
Reference in New Issue
Block a user