mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-11 21:38:19 +00:00
In the ObjectFile interface, replace isInternal(), isAbsolute(), isGlobal(), and isWeak(), with a bitset of flags.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151670 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -159,17 +159,23 @@ error_code COFFObjectFile::getSymbolType(DataRefImpl Symb,
|
||||
return object_error::success;
|
||||
}
|
||||
|
||||
error_code COFFObjectFile::isSymbolGlobal(DataRefImpl Symb,
|
||||
bool &Result) const {
|
||||
error_code COFFObjectFile::getSymbolFlags(DataRefImpl Symb,
|
||||
uint32_t &Result) const {
|
||||
const coff_symbol *symb = toSymb(Symb);
|
||||
Result = (symb->StorageClass == COFF::IMAGE_SYM_CLASS_EXTERNAL);
|
||||
return object_error::success;
|
||||
}
|
||||
Result = SymbolRef::SF_None;
|
||||
|
||||
// TODO: Set SF_FormatSpecific.
|
||||
|
||||
// TODO: This are certainly too restrictive.
|
||||
if (symb->StorageClass == COFF::IMAGE_SYM_CLASS_EXTERNAL)
|
||||
Result |= SymbolRef::SF_Global;
|
||||
|
||||
if (symb->StorageClass == COFF::IMAGE_SYM_CLASS_WEAK_EXTERNAL)
|
||||
Result |= SymbolRef::SF_Weak;
|
||||
|
||||
if (symb->SectionNumber == COFF::IMAGE_SYM_ABSOLUTE)
|
||||
Result |= SymbolRef::SF_Absolute;
|
||||
|
||||
error_code COFFObjectFile::isSymbolWeak(DataRefImpl Symb,
|
||||
bool &Result) const {
|
||||
const coff_symbol *symb = toSymb(Symb);
|
||||
Result = (symb->StorageClass == COFF::IMAGE_SYM_CLASS_WEAK_EXTERNAL);
|
||||
return object_error::success;
|
||||
}
|
||||
|
||||
@ -262,19 +268,6 @@ error_code COFFObjectFile::getSymbolNMTypeChar(DataRefImpl Symb,
|
||||
return object_error::success;
|
||||
}
|
||||
|
||||
error_code COFFObjectFile::isSymbolInternal(DataRefImpl Symb,
|
||||
bool &Result) const {
|
||||
Result = false;
|
||||
return object_error::success;
|
||||
}
|
||||
|
||||
error_code COFFObjectFile::isSymbolAbsolute(DataRefImpl Symb,
|
||||
bool &Result) const {
|
||||
const coff_symbol *symb = toSymb(Symb);
|
||||
Result = symb->SectionNumber == COFF::IMAGE_SYM_ABSOLUTE;
|
||||
return object_error::success;
|
||||
}
|
||||
|
||||
error_code COFFObjectFile::getSymbolSection(DataRefImpl Symb,
|
||||
section_iterator &Result) const {
|
||||
const coff_symbol *symb = toSymb(Symb);
|
||||
|
Reference in New Issue
Block a user