[llvm] r269866 - llvm-dwp: remove some unused error handling
David Blaikie via llvm-commits
llvm-commits at lists.llvm.org
Tue May 17 16:44:13 PDT 2016
Author: dblaikie
Date: Tue May 17 18:44:13 2016
New Revision: 269866
URL: http://llvm.org/viewvc/llvm-project?rev=269866&view=rev
Log:
llvm-dwp: remove some unused error handling
Modified:
llvm/trunk/tools/llvm-dwp/llvm-dwp.cpp
Modified: llvm/trunk/tools/llvm-dwp/llvm-dwp.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-dwp/llvm-dwp.cpp?rev=269866&r1=269865&r2=269866&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-dwp/llvm-dwp.cpp (original)
+++ llvm/trunk/tools/llvm-dwp/llvm-dwp.cpp Tue May 17 18:44:13 2016
@@ -54,7 +54,7 @@ static opt<std::string> OutputFilename(R
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,
// 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,
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, Arra
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
More information about the llvm-commits
mailing list