diff options
author | Greg Clayton <gclayton@apple.com> | 2017-01-11 17:43:37 +0000 |
---|---|---|
committer | Greg Clayton <gclayton@apple.com> | 2017-01-11 17:43:37 +0000 |
commit | d1efea89c96d99813bea83e84b64d88b22de75fc (patch) | |
tree | 8abafbb3c3eaca1e1083a6cd3c9409d1863639bd /llvm/lib/DebugInfo/DWARF/DWARFUnit.cpp | |
parent | 778d0816ab31f09b5971e65f7c2ae5c2a571c0cc (diff) | |
download | bcm5719-llvm-d1efea89c96d99813bea83e84b64d88b22de75fc.tar.gz bcm5719-llvm-d1efea89c96d99813bea83e84b64d88b22de75fc.zip |
Remove all variants of DWARFDie::getAttributeValueAs...() that had parameters that specified default values.
Now we only support returning Optional<> values and have changed all clients over to use Optional::getValueOr().
Differential Revision: https://reviews.llvm.org/D28569
llvm-svn: 291686
Diffstat (limited to 'llvm/lib/DebugInfo/DWARF/DWARFUnit.cpp')
-rw-r--r-- | llvm/lib/DebugInfo/DWARF/DWARFUnit.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/llvm/lib/DebugInfo/DWARF/DWARFUnit.cpp b/llvm/lib/DebugInfo/DWARF/DWARFUnit.cpp index 63fb0d3bc36..ee2c569b0bc 100644 --- a/llvm/lib/DebugInfo/DWARF/DWARFUnit.cpp +++ b/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. } |