aboutsummaryrefslogtreecommitdiff
path: root/contrib/llvm/lib/DebugInfo/DWARF/DWARFUnit.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-01-14 22:12:13 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-01-14 22:12:13 +0000
commitf1a29dd3442304e183b0491fbe2d33f6c963069e (patch)
tree64b5defb92948be8b09a6f1b5c48ec60abad1325 /contrib/llvm/lib/DebugInfo/DWARF/DWARFUnit.cpp
parent8a6fe8ce60ab99778558c4951d23615a0141daf0 (diff)
parent581a6d8501ff5614297da837b81ed3b6956361ea (diff)
Merge llvm, clang, lld and lldb release_40 branch r292009. Also update
build glue.
Notes
Notes: svn path=/projects/clang400-import/; revision=312197
Diffstat (limited to 'contrib/llvm/lib/DebugInfo/DWARF/DWARFUnit.cpp')
-rw-r--r--contrib/llvm/lib/DebugInfo/DWARF/DWARFUnit.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/contrib/llvm/lib/DebugInfo/DWARF/DWARFUnit.cpp b/contrib/llvm/lib/DebugInfo/DWARF/DWARFUnit.cpp
index 63fb0d3bc368..ee2c569b0bce 100644
--- a/contrib/llvm/lib/DebugInfo/DWARF/DWARFUnit.cpp
+++ b/contrib/llvm/lib/DebugInfo/DWARF/DWARFUnit.cpp
@@ -230,10 +230,12 @@ size_t DWARFUnit::extractDIEsIfNeeded(bool CUDieOnly) {
BaseAddr = UnitDie.getAttributeValueAsAddress(DW_AT_entry_pc);
if (BaseAddr)
setBaseAddress(*BaseAddr);
- AddrOffsetSectionBase = UnitDie.getAttributeValueAsSectionOffset(
- DW_AT_GNU_addr_base, 0);
- RangeSectionBase = UnitDie.getAttributeValueAsSectionOffset(
- DW_AT_rnglists_base, 0);
+ AddrOffsetSectionBase =
+ UnitDie.getAttributeValueAsSectionOffset(DW_AT_GNU_addr_base)
+ .getValueOr(0);
+ RangeSectionBase =
+ UnitDie.getAttributeValueAsSectionOffset(DW_AT_rnglists_base)
+ .getValueOr(0);
// Don't fall back to DW_AT_GNU_ranges_base: it should be ignored for
// skeleton CU DIE, so that DWARF users not aware of it are not broken.
}