Fix. Apply the no capture attribute to the correct parameter.
authorBill Wendling <isanbard@gmail.com>
Tue, 9 Oct 2012 00:51:40 +0000 (00:51 +0000)
committerBill Wendling <isanbard@gmail.com>
Tue, 9 Oct 2012 00:51:40 +0000 (00:51 +0000)
llvm-svn: 165469

llvm/lib/Transforms/Scalar/ObjCARC.cpp

index dbcafb0..dca6a72 100644 (file)
@@ -3840,10 +3840,13 @@ Constant *ObjCARCContract::getStoreStrongCallee(Module *M) {
     Type *I8XX = PointerType::getUnqual(I8X);
     Type *Params[] = { I8XX, I8X };
 
-    Attributes::Builder B;
-    B.addNoUnwindAttr();
-    B.addNoCaptureAttr();
-    AttrListPtr Attributes = AttrListPtr().addAttr(~0u, Attributes::get(B));
+    Attributes::Builder BNoUnwind;
+    BNoUnwind.addNoUnwindAttr();
+    Attributes::Builder BNoCapture;
+    BNoCapture.addNoCaptureAttr();
+    AttrListPtr Attributes = AttrListPtr()
+      .addAttr(~0u, Attributes::get(BNoUnwind))
+      .addAttr(1, Attributes::get(BNoCapture));
 
     StoreStrongCallee =
       M->getOrInsertFunction(