diff options
Diffstat (limited to 'llvm/tools/llvm-pdbutil/DumpOutputStyle.cpp')
-rw-r--r-- | llvm/tools/llvm-pdbutil/DumpOutputStyle.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/tools/llvm-pdbutil/DumpOutputStyle.cpp b/llvm/tools/llvm-pdbutil/DumpOutputStyle.cpp index 4ad26bef20c..dab1e42c3a2 100644 --- a/llvm/tools/llvm-pdbutil/DumpOutputStyle.cpp +++ b/llvm/tools/llvm-pdbutil/DumpOutputStyle.cpp @@ -1376,12 +1376,12 @@ Error DumpOutputStyle::dumpTypesFromObjectFile() { else continue; - StringRef Contents; - if (auto EC = S.getContents(Contents)) - return errorCodeToError(EC); + Expected<StringRef> ContentsOrErr = S.getContents(); + if (!ContentsOrErr) + return ContentsOrErr.takeError(); uint32_t Magic; - BinaryStreamReader Reader(Contents, llvm::support::little); + BinaryStreamReader Reader(*ContentsOrErr, llvm::support::little); if (auto EC = Reader.readInteger(Magic)) return EC; if (Magic != COFF::DEBUG_SECTION_MAGIC) |