if (Obj->getSymbolName(Symbol, SymbolName))
SymbolName = "";
- StringRef SectionName;
- if (Section && Obj->getSectionName(Section, SectionName))
- SectionName = "";
+ StringRef SectionName = "";
+ if (Section)
+ Obj->getSectionName(Section, SectionName);
W.printString("Name", SymbolName);
W.printNumber("Value", Symbol->Value);
if (SymI->getName(SymbolName))
SymbolName = "";
- StringRef SectionName;
- if (Section && Obj->getSectionName(Section, SectionName))
- SectionName = "";
+ StringRef SectionName = "";
+ if (Section)
+ Obj->getSectionName(Section, SectionName);
std::string FullSymbolName(SymbolName);
if (IsDynamic) {
MachOSymbol Symbol;
getSymbol(Obj, SymI->getRawDataRefImpl(), Symbol);
- StringRef SectionName;
+ StringRef SectionName = "";
section_iterator SecI(Obj->end_sections());
- if (error(SymI->getSection(SecI)) ||
- SecI == Obj->end_sections() ||
- error(SecI->getName(SectionName)))
- SectionName = "";
+ if (!error(SymI->getSection(SecI)) &&
+ SecI != Obj->end_sections())
+ error(SecI->getName(SectionName));
DictScope D(W, "Symbol");
W.printNumber("Name", SymbolName, Symbol.StringIndex);