pImpl->AttrsSet.InsertNode(PA, InsertPoint);
}
- // Return the AttributesList that we found or created.
+ // Return the Attribute that we found or created.
return Attribute(PA);
}
return *this;
}
+AttrBuilder &AttrBuilder::addAttribute(StringRef A, StringRef V) {
+ TargetDepAttrs[A] = V;
+ return *this;
+}
+
AttrBuilder &AttrBuilder::removeAttribute(Attribute::AttrKind Val) {
Attrs.erase(Val);
return *this;
}
+AttrBuilder &AttrBuilder::removeAttribute(StringRef A) {
+ std::map<std::string, std::string>::iterator I = TargetDepAttrs.find(A);
+ if (I != TargetDepAttrs.end())
+ TargetDepAttrs.erase(I);
+ return *this;
+}
+
AttrBuilder &AttrBuilder::addAlignmentAttr(unsigned Align) {
if (Align == 0) return *this;