[llvm] [LLVM][DWARF] Fix uniquness of AccelTable Values (PR #74391)

Pavel Labath via llvm-commits llvm-commits at lists.llvm.org
Fri May 3 00:39:05 PDT 2024


labath wrote:

> I was hoping, someone who originally worked on it would know. :)

Unfortunately, I have successfully purged all memory of this. Looking at the history, it seems like this code isn't even exactly my invention -- it was copied/adapted from the original apple accel table implementation. I'm not sure if it was correct then(*), but I have a feeling it's not correct now. For debug_names, the order() function returns a die offset, and (in the presence of multiple compile and type units), I don't think that's guaranteed to uniquely identify a DIE (i.e., erasure could cause us to lose information). Maybe the erase call just needs to be deleted ?

(*) It definitely was not correct in the sense that `AppleAccelTableData` also did not have an equality operator, but it *might* have been (given that apple_names doesn't do type units, and uses section-relative (instead of cu-relative) die offsets) correct if one were to implement the operator.

https://github.com/llvm/llvm-project/pull/74391


More information about the llvm-commits mailing list