mirror of
https://github.com/RPCSX/llvm.git
synced 2025-01-26 22:45:05 +00:00
llvm-dwp: remove some unused error handling
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269866 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
8e5ffc9803
commit
f84af69256
@ -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…
x
Reference in New Issue
Block a user