llvm.org GIT mirror llvm / 4883193
llvm-readobj: Do not print NULL StringRefs git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180005 91177308-0d34-0410-b5e6-96231b3b80d8 Nico Rieck 7 years ago
3 changed file(s) with 10 addition(s) and 11 deletion(s). Raw diff Collapse all Expand all
725725 if (Obj->getSymbolName(Symbol, SymbolName))
726726 SymbolName = "";
727727
728 StringRef SectionName;
729 if (Section && Obj->getSectionName(Section, SectionName))
730 SectionName = "";
728 StringRef SectionName = "";
729 if (Section)
730 Obj->getSectionName(Section, SectionName);
731731
732732 W.printString("Name", SymbolName);
733733 W.printNumber("Value", Symbol->Value);
642642 if (SymI->getName(SymbolName))
643643 SymbolName = "";
644644
645 StringRef SectionName;
646 if (Section && Obj->getSectionName(Section, SectionName))
647 SectionName = "";
645 StringRef SectionName = "";
646 if (Section)
647 Obj->getSectionName(Section, SectionName);
648648
649649 std::string FullSymbolName(SymbolName);
650650 if (IsDynamic) {
405405 MachOSymbol Symbol;
406406 getSymbol(Obj, SymI->getRawDataRefImpl(), Symbol);
407407
408 StringRef SectionName;
408 StringRef SectionName = "";
409409 section_iterator SecI(Obj->end_sections());
410 if (error(SymI->getSection(SecI)) ||
411 SecI == Obj->end_sections() ||
412 error(SecI->getName(SectionName)))
413 SectionName = "";
410 if (!error(SymI->getSection(SecI)) &&
411 SecI != Obj->end_sections())
412 error(SecI->getName(SectionName));
414413
415414 DictScope D(W, "Symbol");
416415 W.printNumber("Name", SymbolName, Symbol.StringIndex);