DataRefImpl DR = Section.getRawDataRefImpl();
StringRef Name;
- if (error(Section.getName(Name)))
- Name = "";
+ error(Section.getName(Name));
ArrayRef<char> RawName = Obj->getSectionRawName(DR);
StringRef SegmentName = Obj->getSectionFinalSegmentName(DR);
bool IsBSS = Section.isBSS();
if (!IsBSS) {
StringRef Data;
- if (error(Section.getContents(Data)))
- break;
+ error(Section.getContents(Data));
W.printBinaryBlock("SectionData", Data);
}
std::error_code EC;
for (const SectionRef &Section : Obj->sections()) {
StringRef Name;
- if (error(Section.getName(Name)))
- continue;
+ error(Section.getName(Name));
bool PrintedGroup = false;
for (const RelocationRef &Reloc : Section.relocations()) {
symbol_iterator Symbol = Reloc.getSymbol();
if (Symbol != Obj->symbol_end()) {
ErrorOr<StringRef> TargetNameOrErr = Symbol->getName();
- if (error(TargetNameOrErr.getError()))
- return;
+ error(TargetNameOrErr.getError());
TargetName = *TargetNameOrErr;
}
} else if (!IsScattered) {
section_iterator SecI = Obj->getRelocationSection(DR);
if (SecI != Obj->section_end()) {
- if (error(SecI->getName(TargetName)))
- return;
+ error(SecI->getName(TargetName));
}
}
if (TargetName.empty())
StringRef SectionName = "";
section_iterator SecI(Obj->section_begin());
- if (!error(Symbol.getSection(SecI)) && SecI != Obj->section_end())
+ error(Symbol.getSection(SecI));
+ if (SecI != Obj->section_end())
error(SecI->getName(SectionName));
DictScope D(W, "Symbol");