[dsymutil] Track uncloned references in the DIEInfo.
To improve deduplication across CUs within a single object file, 2b747241 changed the way we track ODR canonical candidates. The result is that some assumptions no longer hold. Because of the aforementioned change, the following condition assert(Ref > InputDIE.getOffset()); in DWARFLinker::DIECloner::cloneDieReferenceAttribute is no longer an invariant. An example of a situation where this assertion no longer holds is when we have decided to replace a backward reference in the current CU with a forward reference in a subsequent CU. The ODR canonical DIE hasn't been emitted yet, but the references DIE has an offset smaller than the current DIE. The assertion is only true if the referenced DIE was the ODR canonical DIE, which is no longer guaranteed to be part of the same CU. Big thanks to Alexey for putting a test together. Differential revision: https://reviews.llvm.org/D138176
Loading
Please sign in to comment