Remove the bitwise assignment OR operator from the Attributes class. Replace it with...
[oota-llvm.git] / lib / Transforms / Utils / CloneFunction.cpp
index e2932501f31f3437f997385be886f0ff291c7c47..831f94afb46c0749905df2d58d4708bb622d9ef1 100644 (file)
@@ -98,10 +98,12 @@ void llvm::CloneFunctionInto(Function *NewFunc, const Function *OldFunc,
         Anew->addAttr( OldFunc->getAttributes()
                        .getParamAttributes(I->getArgNo() + 1));
     NewFunc->setAttributes(NewFunc->getAttributes()
-                           .addAttr(0, OldFunc->getAttributes()
+                           .addAttr(NewFunc->getContext(), 0,
+                                    OldFunc->getAttributes()
                                      .getRetAttributes()));
     NewFunc->setAttributes(NewFunc->getAttributes()
-                           .addAttr(~0, OldFunc->getAttributes()
+                           .addAttr(NewFunc->getContext(), ~0,
+                                    OldFunc->getAttributes()
                                      .getFnAttributes()));
 
   }