summaryrefslogtreecommitdiffstats
path: root/llvm/tools/dsymutil/DwarfStreamer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/tools/dsymutil/DwarfStreamer.cpp')
-rw-r--r--llvm/tools/dsymutil/DwarfStreamer.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/llvm/tools/dsymutil/DwarfStreamer.cpp b/llvm/tools/dsymutil/DwarfStreamer.cpp
index 8fc29851786..9461f4de819 100644
--- a/llvm/tools/dsymutil/DwarfStreamer.cpp
+++ b/llvm/tools/dsymutil/DwarfStreamer.cpp
@@ -31,11 +31,7 @@ static Optional<object::SectionRef>
getSectionByName(const object::ObjectFile &Obj, StringRef SecName) {
for (const object::SectionRef &Section : Obj.sections()) {
StringRef SectionName;
- if (Expected<StringRef> NameOrErr = Section.getName())
- SectionName = *NameOrErr;
- else
- consumeError(NameOrErr.takeError());
-
+ Section.getName(SectionName);
SectionName = SectionName.substr(SectionName.find_first_not_of("._"));
if (SectionName != SecName)
continue;
OpenPOWER on IntegriCloud