diff options
Diffstat (limited to 'llvm/tools/llvm-dwp/llvm-dwp.cpp')
-rw-r--r-- | llvm/tools/llvm-dwp/llvm-dwp.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/tools/llvm-dwp/llvm-dwp.cpp b/llvm/tools/llvm-dwp/llvm-dwp.cpp index 2d6bd7f..9715ee3 100644 --- a/llvm/tools/llvm-dwp/llvm-dwp.cpp +++ b/llvm/tools/llvm-dwp/llvm-dwp.cpp @@ -410,9 +410,10 @@ static Error handleSection( if (std::error_code Err = Section.getName(Name)) return errorCodeToError(Err); - StringRef Contents; - if (auto Err = Section.getContents(Contents)) - return errorCodeToError(Err); + Expected<StringRef> ContentsOrErr = Section.getContents(); + if (!ContentsOrErr) + return ContentsOrErr.takeError(); + StringRef Contents = *ContentsOrErr; if (auto Err = handleCompressedSection(UncompressedSections, Name, Contents)) return Err; |