Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F11015460
D62118.id.diff
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Tue, Dec 10, 1:00 PM
Size
798 B
Mime Type
text/x-patch; charset=utf-8
Expires
Wed, Dec 11, 1:00 PM (1 d)
Engine
blob
Format
Raw Data
Handle
5912730
Attached To
D62118: [DWARF] hoist nullptr checks. NFC
D62118.id.diff
View Options
Index: llvm/trunk/lib/DebugInfo/DWARF/DWARFFormValue.cpp
===================================================================
--- llvm/trunk/lib/DebugInfo/DWARF/DWARFFormValue.cpp
+++ llvm/trunk/lib/DebugInfo/DWARF/DWARFFormValue.cpp
@@ -401,12 +401,14 @@
case DW_FORM_addrx3:
case DW_FORM_addrx4:
case DW_FORM_GNU_addr_index: {
+ if (U == nullptr) {
+ OS << "<invalid dwarf unit>";
+ break;
+ }
Optional<object::SectionedAddress> A = U->getAddrOffsetSectionItem(UValue);
if (!A || DumpOpts.Verbose)
AddrOS << format("indexed (%8.8x) address = ", (uint32_t)UValue);
- if (U == nullptr)
- OS << "<invalid dwarf unit>";
- else if (A)
+ if (A)
dumpSectionedAddress(AddrOS, DumpOpts, *A);
else
OS << "<no .debug_addr section>";
Event Timeline
Log In to Comment