llvm-project
040f5ee4 - Add flags check to createVariantMemberType (#139261)

Commit
116 days ago
Add flags check to createVariantMemberType (#139261) I noticed that DIDerivedType overloads the "ExtraData" member depending on the precise type being implemented. A variant part uses this to store the discriminant (a reference to another member), but a bit field uses it to store the storage offset. This patch changes createVariantMemberType to ensure that the FlagBitField is not used when creating a variant part. If this flag is used, the ExtraData field would be erroneously used in two different ways. The patch also updates a comment in DIDerivedType to list a couple more cases.
Author
Parents
  • llvm
    • include/llvm/IR
      • File
        DebugInfoMetadata.h
    • lib/IR
      • File
        DIBuilder.cpp