aboutsummaryrefslogtreecommitdiff
path: root/tools/llvm-dwp
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2016-05-17 23:44:13 +0000
committerDavid Blaikie <dblaikie@gmail.com>2016-05-17 23:44:13 +0000
commitf84af69256ff5575440aaa058c74c5e0d10a9260 (patch)
treeea3d9900c84cbb9a31ae8c8ea6e2349b7a52c1a9 /tools/llvm-dwp
parent8e5ffc980389d12a1dea21173b374574eb109c51 (diff)
llvm-dwp: remove some unused error handling
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269866 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-dwp')
-rw-r--r--tools/llvm-dwp/llvm-dwp.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/tools/llvm-dwp/llvm-dwp.cpp b/tools/llvm-dwp/llvm-dwp.cpp
index 5a3d69bef85..1f3bb786d41 100644
--- a/tools/llvm-dwp/llvm-dwp.cpp
+++ b/tools/llvm-dwp/llvm-dwp.cpp
@@ -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