summaryrefslogtreecommitdiffstats
path: root/llvm/lib/DebugInfo/Symbolize/SymbolizableObjectFile.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/DebugInfo/Symbolize/SymbolizableObjectFile.cpp')
-rw-r--r--llvm/lib/DebugInfo/Symbolize/SymbolizableObjectFile.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/DebugInfo/Symbolize/SymbolizableObjectFile.cpp b/llvm/lib/DebugInfo/Symbolize/SymbolizableObjectFile.cpp
index 5d453def7b4..fc529630e97 100644
--- a/llvm/lib/DebugInfo/Symbolize/SymbolizableObjectFile.cpp
+++ b/llvm/lib/DebugInfo/Symbolize/SymbolizableObjectFile.cpp
@@ -53,13 +53,13 @@ SymbolizableObjectFile::create(object::ObjectFile *Obj,
if (Obj->getArch() == Triple::ppc64) {
for (section_iterator Section : Obj->sections()) {
StringRef Name;
- StringRef Data;
if (auto EC = Section->getName(Name))
return EC;
if (Name == ".opd") {
- if (auto EC = Section->getContents(Data))
- return EC;
- OpdExtractor.reset(new DataExtractor(Data, Obj->isLittleEndian(),
+ Expected<StringRef> E = Section->getContents();
+ if (!E)
+ return errorToErrorCode(E.takeError());
+ OpdExtractor.reset(new DataExtractor(*E, Obj->isLittleEndian(),
Obj->getBytesInAddress()));
OpdAddress = Section->getAddress();
break;
OpenPOWER on IntegriCloud