Verify the LLVMContext that an Attribute belongs to.

Attributes don't know their parent Context, adding this would make Attribute larger. Instead, we add hasParentContext that answers whether this Attribute belongs to a particular LLVMContext by checking for itself inside the context's FoldingSet. Same with AttributeSet and AttributeList. The Verifier checks them with the Module context.

Differential Revision: https://reviews.llvm.org/D99362

GitOrigin-RevId: 244d9d6e41db71e76eeb55e56d84f658b3f56681
5 files changed