[llvm] r204313 - Object: Abstract out the determination of function line symbols
David Majnemer
david.majnemer at gmail.com
Wed Mar 19 23:28:56 PDT 2014
Author: majnemer
Date: Thu Mar 20 01:28:55 2014
New Revision: 204313
URL: http://llvm.org/viewvc/llvm-project?rev=204313&view=rev
Log:
Object: Abstract out the determination of function line symbols
No functionality change.
Modified:
llvm/trunk/include/llvm/Object/COFF.h
llvm/trunk/tools/obj2yaml/coff2yaml.cpp
Modified: llvm/trunk/include/llvm/Object/COFF.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Object/COFF.h?rev=204313&r1=204312&r2=204313&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Object/COFF.h (original)
+++ llvm/trunk/include/llvm/Object/COFF.h Thu Mar 20 01:28:55 2014
@@ -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 &&
Modified: llvm/trunk/tools/obj2yaml/coff2yaml.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/obj2yaml/coff2yaml.cpp?rev=204313&r1=204312&r2=204313&view=diff
==============================================================================
--- llvm/trunk/tools/obj2yaml/coff2yaml.cpp (original)
+++ llvm/trunk/tools/obj2yaml/coff2yaml.cpp Thu Mar 20 01:28:55 2014
@@ -157,7 +157,7 @@ void COFFDumper::dumpSymbols(unsigned Nu
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!");
More information about the llvm-commits
mailing list