HomePhabricator

[DebugInfo] Don't overwrite DWARFUnit fields if the CU DIE doesn't have them.

Authored by bkramer on Jul 31 2017, 8:32 AM.

Description

[DebugInfo] Don't overwrite DWARFUnit fields if the CU DIE doesn't have them.

DIEs are lazily deserialized so it's possible that the DWO CU is created
before the DIE is parsed. DWO shares .debug_addr and .debug_ranges with the
object file so overwriting the offset with 0 will make the CU unusable.

No test case because I couldn't get clang to emit a non-zero range base.

llvm-svn: 309570

Details

Committed
bkramerJul 31 2017, 8:32 AM
Parents
rG160d9472f4ae: Fix -Wshadow false positives with function-local classes.
Branches
Unknown
Tags
Unknown