summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/llvm/Object/COFF.h4
-rw-r--r--tools/obj2yaml/coff2yaml.cpp2
2 files changed, 5 insertions, 1 deletions
diff --git a/include/llvm/Object/COFF.h b/include/llvm/Object/COFF.h
index 0f24c1b8e5..31b7d6ea17 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 b003029407..1542506e5f 100644
--- a/tools/obj2yaml/coff2yaml.cpp
+++ b/tools/obj2yaml/coff2yaml.cpp
@@ -157,7 +157,7 @@ void COFFDumper::dumpSymbols(unsigned NumSymbols) {
reinterpret_cast<const object::coff_aux_function_definition *>(
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!");