// If we didn't find any existing attributes of the same shape then
// create a new one and insert it.
if (!PA) {
- PA = new AttributeSetImpl(Attrs);
+ PA = new AttributeSetImpl(C, Attrs);
pImpl->AttrsLists.InsertNode(PA, InsertPoint);
}
namespace llvm {
+class LLVMContext;
+
class AttributesImpl : public FoldingSetNode {
uint64_t Bits; // FIXME: We will be expanding this.
public:
void operator=(const AttributeSetImpl &) LLVM_DELETED_FUNCTION;
AttributeSetImpl(const AttributeSetImpl &) LLVM_DELETED_FUNCTION;
public:
+ LLVMContext &Context;
SmallVector<AttributeWithIndex, 4> Attrs;
- AttributeSetImpl(ArrayRef<AttributeWithIndex> attrs)
- : Attrs(attrs.begin(), attrs.end()) {}
+ AttributeSetImpl(LLVMContext &C, ArrayRef<AttributeWithIndex> attrs)
+ : Context(C), Attrs(attrs.begin(), attrs.end()) {}
void Profile(FoldingSetNodeID &ID) const {
Profile(ID, Attrs);