[llvm] [RemoveDIs][NFC] Introduce DbgRecord base class [1/3] (PR #78252)

Orlando Cazalet-Hyams via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 20 03:42:12 PST 2024


OCHyams wrote:

> Am I right in thinking that there are effectively two levels of "kinds" to deal with -- kinds of DbgRecords and kinds of DPValues? And is that going to change in the later patches -- reason being that there's potential for people being confused by this, plus there's precedent in the rest of LLVM to have a single enum for each hierachy and use isa/dyn_cast/etc to distinguish them.

Yes there's a `DbgRecord::Kind` which is the subclass discriminator (for dync_cast etc), and there's `DPValue::LocationType`. If we ever want to split the DPValue kinds into separate classes then it could make sense to move the LocationType values up into the `DbgRecord::Kind`. That might be done in the future to reduce the size of dbg.value/declare kinds, which currently carry the weight of dbg.assign-kinds. But I hadn't intended for that work to come in this patch-set.

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


More information about the llvm-commits mailing list