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/llvm-symbolizer/LLVMSymbolize.cpp b/llvm/tools/llvm-symbolizer/LLVMSymbolize.cpp
index 33c3a3a..143dca4 100644
--- a/llvm/tools/llvm-symbolizer/LLVMSymbolize.cpp
+++ b/llvm/tools/llvm-symbolizer/LLVMSymbolize.cpp
@@ -80,9 +80,7 @@
void ModuleInfo::addSymbol(const SymbolRef &Symbol, uint64_t SymbolSize,
DataExtractor *OpdExtractor, uint64_t OpdAddress) {
- SymbolRef::Type SymbolType;
- if (error(Symbol.getType(SymbolType)))
- return;
+ SymbolRef::Type SymbolType = Symbol.getType();
if (SymbolType != SymbolRef::ST_Function && SymbolType != SymbolRef::ST_Data)
return;
uint64_t SymbolAddress;