diff --git a/include/llvm/Object/COFF.h b/include/llvm/Object/COFF.h index 0f24c1b8e51..31b7d6ea174 100644 --- a/include/llvm/Object/COFF.h +++ b/include/llvm/Object/COFF.h @@ -210,6 +210,10 @@ struct coff_symbol { !COFF::isReservedSectionNumber(SectionNumber); } + bool isFunctionLineInfo() const { + return StorageClass == COFF::IMAGE_SYM_CLASS_FUNCTION; + } + bool isWeakExternal() const { return StorageClass == COFF::IMAGE_SYM_CLASS_WEAK_EXTERNAL || (StorageClass == COFF::IMAGE_SYM_CLASS_EXTERNAL && diff --git a/tools/obj2yaml/coff2yaml.cpp b/tools/obj2yaml/coff2yaml.cpp index b003029407c..1542506e5f9 100644 --- a/tools/obj2yaml/coff2yaml.cpp +++ b/tools/obj2yaml/coff2yaml.cpp @@ -157,7 +157,7 @@ void COFFDumper::dumpSymbols(unsigned NumSymbols) { reinterpret_cast( AuxData.data()); dumpFunctionDefinition(&Sym, ObjFD); - } else if (Symbol->StorageClass == COFF::IMAGE_SYM_CLASS_FUNCTION) { + } else if (Symbol->isFunctionLineInfo()) { // This symbol describes function line number information. assert(Symbol->NumberOfAuxSymbols == 1 && "Exepected a single aux symbol to describe this section!");