summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-pdbutil/InputFile.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/tools/llvm-pdbutil/InputFile.cpp')
-rw-r--r--llvm/tools/llvm-pdbutil/InputFile.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/llvm/tools/llvm-pdbutil/InputFile.cpp b/llvm/tools/llvm-pdbutil/InputFile.cpp
index 8380054b631..bd23bfdbe31 100644
--- a/llvm/tools/llvm-pdbutil/InputFile.cpp
+++ b/llvm/tools/llvm-pdbutil/InputFile.cpp
@@ -66,13 +66,12 @@ getModuleDebugStream(PDBFile &File, StringRef &ModuleName, uint32_t Index) {
static inline bool isCodeViewDebugSubsection(object::SectionRef Section,
StringRef Name,
BinaryStreamReader &Reader) {
- if (Expected<StringRef> NameOrErr = Section.getName()) {
- if (*NameOrErr != Name)
- return false;
- } else {
- consumeError(NameOrErr.takeError());
+ StringRef SectionName;
+ if (Section.getName(SectionName))
+ return false;
+
+ if (SectionName != Name)
return false;
- }
Expected<StringRef> ContentsOrErr = Section.getContents();
if (!ContentsOrErr) {
OpenPOWER on IntegriCloud