forked from OSchip/llvm-project
Object: Abstract out the determination of function line symbols
No functionality change. llvm-svn: 204313
This commit is contained in:
parent
d9eb2d1401
commit
ed98b68ed8
|
|
@ -210,6 +210,10 @@ struct coff_symbol {
|
||||||
!COFF::isReservedSectionNumber(SectionNumber);
|
!COFF::isReservedSectionNumber(SectionNumber);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool isFunctionLineInfo() const {
|
||||||
|
return StorageClass == COFF::IMAGE_SYM_CLASS_FUNCTION;
|
||||||
|
}
|
||||||
|
|
||||||
bool isWeakExternal() const {
|
bool isWeakExternal() const {
|
||||||
return StorageClass == COFF::IMAGE_SYM_CLASS_WEAK_EXTERNAL ||
|
return StorageClass == COFF::IMAGE_SYM_CLASS_WEAK_EXTERNAL ||
|
||||||
(StorageClass == COFF::IMAGE_SYM_CLASS_EXTERNAL &&
|
(StorageClass == COFF::IMAGE_SYM_CLASS_EXTERNAL &&
|
||||||
|
|
|
||||||
|
|
@ -157,7 +157,7 @@ void COFFDumper::dumpSymbols(unsigned NumSymbols) {
|
||||||
reinterpret_cast<const object::coff_aux_function_definition *>(
|
reinterpret_cast<const object::coff_aux_function_definition *>(
|
||||||
AuxData.data());
|
AuxData.data());
|
||||||
dumpFunctionDefinition(&Sym, ObjFD);
|
dumpFunctionDefinition(&Sym, ObjFD);
|
||||||
} else if (Symbol->StorageClass == COFF::IMAGE_SYM_CLASS_FUNCTION) {
|
} else if (Symbol->isFunctionLineInfo()) {
|
||||||
// This symbol describes function line number information.
|
// This symbol describes function line number information.
|
||||||
assert(Symbol->NumberOfAuxSymbols == 1 &&
|
assert(Symbol->NumberOfAuxSymbols == 1 &&
|
||||||
"Exepected a single aux symbol to describe this section!");
|
"Exepected a single aux symbol to describe this section!");
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue