forked from OSchip/llvm-project
llvm-dwp: remove some unused error handling
llvm-svn: 269866
This commit is contained in:
parent
b18921b565
commit
bc619cde52
|
@ -54,7 +54,7 @@ static opt<std::string> OutputFilename(Required, "o",
|
|||
value_desc("filename"),
|
||||
cat(DwpCategory));
|
||||
|
||||
static Error
|
||||
static void
|
||||
writeStringsAndOffsets(MCStreamer &Out, StringMap<uint32_t> &Strings,
|
||||
uint32_t &StringOffset, MCSection *StrSection,
|
||||
MCSection *StrOffsetSection, StringRef CurStrSection,
|
||||
|
@ -62,7 +62,7 @@ writeStringsAndOffsets(MCStreamer &Out, StringMap<uint32_t> &Strings,
|
|||
// Could possibly produce an error or warning if one of these was non-null but
|
||||
// the other was null.
|
||||
if (CurStrSection.empty() || CurStrOffsetSection.empty())
|
||||
return Error();
|
||||
return;
|
||||
|
||||
DenseMap<uint32_t, uint32_t> OffsetRemapping;
|
||||
|
||||
|
@ -93,8 +93,6 @@ writeStringsAndOffsets(MCStreamer &Out, StringMap<uint32_t> &Strings,
|
|||
auto NewOffset = OffsetRemapping[OldOffset];
|
||||
Out.EmitIntValue(NewOffset, 4);
|
||||
}
|
||||
|
||||
return Error();
|
||||
}
|
||||
|
||||
static uint32_t getCUAbbrev(StringRef Abbrev, uint64_t AbbrCode) {
|
||||
|
@ -558,10 +556,9 @@ static Error write(MCStreamer &Out, ArrayRef<std::string> Inputs) {
|
|||
CurEntry, ContributionOffsets[DW_SECT_TYPES - DW_SECT_INFO]);
|
||||
}
|
||||
|
||||
if (auto Err = writeStringsAndOffsets(Out, Strings, StringOffset,
|
||||
StrSection, StrOffsetSection,
|
||||
CurStrSection, CurStrOffsetSection))
|
||||
return Err;
|
||||
writeStringsAndOffsets(Out, Strings, StringOffset, StrSection,
|
||||
StrOffsetSection, CurStrSection,
|
||||
CurStrOffsetSection);
|
||||
}
|
||||
|
||||
// Lie about there being no info contributions so the TU index only includes
|
||||
|
|
Loading…
Reference in New Issue