[PATCH] D46271: [CodeView] Improve debbuging of virtual base class member variables

Adrian Prantl via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 30 10:56:42 PDT 2018


aprantl added inline comments.


================
Comment at: llvm/include/llvm/IR/DebugInfoMetadata.h:793
 
+  /// \brief In inheritance, the pointer offset to virtual bases.
+  uint32_t VBPtrOffset;
----------------
rnk wrote:
> `vbptroffset` is pretty esoteric. It seems really unfortunate to have to widen the very popular `DIDerivedType` constructor to take this obscure parameter. Pointer and reference types are some of the most common kinds of DIDerivedType nodes, so taking an address space is less objectionable, even though it is specialized towards one kind of derived type node.
> 
> I'd recommend encoding this information in the `extraData` field, similar to how we encode bit offsets for bitfields, or making a new `DIInheritanceType` node. @aprantl, @dblaikie WDYT?
please drop the \brief.


================
Comment at: llvm/include/llvm/IR/DebugInfoMetadata.h:793-794
 
+  /// \brief In inheritance, the pointer offset to virtual bases.
+  uint32_t VBPtrOffset;
+
----------------
aprantl wrote:
> rnk wrote:
> > `vbptroffset` is pretty esoteric. It seems really unfortunate to have to widen the very popular `DIDerivedType` constructor to take this obscure parameter. Pointer and reference types are some of the most common kinds of DIDerivedType nodes, so taking an address space is less objectionable, even though it is specialized towards one kind of derived type node.
> > 
> > I'd recommend encoding this information in the `extraData` field, similar to how we encode bit offsets for bitfields, or making a new `DIInheritanceType` node. @aprantl, @dblaikie WDYT?
> please drop the \brief.
Seems reasonable; avoiding making DIDerivedType larger for all languages and platforms would be a good thing.


https://reviews.llvm.org/D46271





More information about the llvm-commits mailing list