Simplify getSymbolType.
This is still a really odd function. Most calls are in object format specific
contexts and should probably be replaced with a more direct query, but at least
now this is not too obnoxious to use.
llvm-svn: 240777
diff --git a/llvm/tools/dsymutil/MachODebugMapParser.cpp b/llvm/tools/dsymutil/MachODebugMapParser.cpp
index b1e6abc..16b95b5 100644
--- a/llvm/tools/dsymutil/MachODebugMapParser.cpp
+++ b/llvm/tools/dsymutil/MachODebugMapParser.cpp
@@ -221,10 +221,9 @@
const MachOObjectFile &MainBinary = MainBinaryHolder.GetAs<MachOObjectFile>();
section_iterator Section = MainBinary.section_end();
for (const auto &Sym : MainBinary.symbols()) {
- SymbolRef::Type Type;
+ SymbolRef::Type Type = Sym.getType();
// Skip undefined and STAB entries.
- if (Sym.getType(Type) || (Type & SymbolRef::ST_Debug) ||
- (Type & SymbolRef::ST_Unknown))
+ if ((Type & SymbolRef::ST_Debug) || (Type & SymbolRef::ST_Unknown))
continue;
StringRef Name;
uint64_t Addr;