Remove the final bits of Attributes being declared in the Attribute
[oota-llvm.git] / lib / Transforms / Scalar / SimplifyLibCalls.cpp
index 15625f9a403a1fa16c8898893c4e87e0bf1edf26..73f53b7cecc78eda73787dbbd603f223e2bd119c 100644 (file)
@@ -636,7 +636,9 @@ struct StrToOpt : public LibCallOptimization {
     if (isa<ConstantPointerNull>(EndPtr)) {
       // With a null EndPtr, this function won't capture the main argument.
       // It would be readonly too, except that it still may write to errno.
-      CI->addAttribute(1, Attribute::NoCapture);
+      Attributes::Builder B;
+      B.addAttribute(Attributes::NoCapture);
+      CI->addAttribute(1, Attributes::get(B));
     }
 
     return 0;