summaryrefslogtreecommitdiffstats
path: root/llvm/lib/DebugInfo/DWARF
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2015-08-07 23:27:14 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2015-08-07 23:27:14 +0000
commit8bab889b0f271665239fa1a7546a49f221ce4ac7 (patch)
treeb573c2c60588c1566182c94733f38aca1b8be07b /llvm/lib/DebugInfo/DWARF
parenteeebc41b580cc5d77f22da312a8d413f96c63edd (diff)
downloadbcm5719-llvm-8bab889b0f271665239fa1a7546a49f221ce4ac7.tar.gz
bcm5719-llvm-8bab889b0f271665239fa1a7546a49f221ce4ac7.zip
Convert getSymbolSection to return an ErrorOr.
This function can actually fail since the symbol contains an index to the section and that can be invalid. llvm-svn: 244375
Diffstat (limited to 'llvm/lib/DebugInfo/DWARF')
-rw-r--r--llvm/lib/DebugInfo/DWARF/DWARFContext.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp b/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
index 408214339a8..4316934df04 100644
--- a/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
+++ b/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
@@ -685,7 +685,7 @@ DWARFContextInMemory::DWARFContextInMemory(const object::ObjectFile &Obj,
}
SymAddr = *SymAddrOrErr;
// Also remember what section this symbol is in for later
- Sym->getSection(RSec);
+ RSec = *Sym->getSection();
} else if (auto *MObj = dyn_cast<MachOObjectFile>(&Obj)) {
// MachO also has relocations that point to sections and
// scattered relocations.
OpenPOWER on IntegriCloud