summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-pdbutil/DumpOutputStyle.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/tools/llvm-pdbutil/DumpOutputStyle.cpp')
-rw-r--r--llvm/tools/llvm-pdbutil/DumpOutputStyle.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/tools/llvm-pdbutil/DumpOutputStyle.cpp b/llvm/tools/llvm-pdbutil/DumpOutputStyle.cpp
index 962d4cf88a8..288e76cc173 100644
--- a/llvm/tools/llvm-pdbutil/DumpOutputStyle.cpp
+++ b/llvm/tools/llvm-pdbutil/DumpOutputStyle.cpp
@@ -1369,9 +1369,10 @@ Error DumpOutputStyle::dumpTypesFromObjectFile() {
LazyRandomTypeCollection Types(100);
for (const auto &S : getObj().sections()) {
- StringRef SectionName;
- if (auto EC = S.getName(SectionName))
- return errorCodeToError(EC);
+ Expected<StringRef> NameOrErr = S.getName();
+ if (!NameOrErr)
+ return NameOrErr.takeError();
+ StringRef SectionName = *NameOrErr;
// .debug$T is a standard CodeView type section, while .debug$P is the same
// format but used for MSVC precompiled header object files.
OpenPOWER on IntegriCloud