Use the AttributeSet when removing multiple attributes. Use Attribute::AttrKind
[oota-llvm.git] / lib / Transforms / IPO / GlobalOpt.cpp
index efec788162bda7144aa9f7131367f0362d0c4416..6fe4316d3bb2ffb070891fe6998d86aa3a479105 100644 (file)
@@ -2072,8 +2072,7 @@ static AttributeSet StripNest(LLVMContext &C, const AttributeSet &Attrs) {
       continue;
 
     // There can be only one.
-    return Attrs.removeAttr(C, Attrs.getSlot(i).Index,
-                            Attribute::get(C, Attribute::Nest));
+    return Attrs.removeAttribute(C, Attrs.getSlot(i).Index, Attribute::Nest);
   }
 
   return Attrs;