Attributes Rewrite
[oota-llvm.git] / lib / Transforms / IPO / PruneEH.cpp
index 17cecbf834a1e155e0e6a755b1b2d1edd7da9a91..b5252aac847067338b7a792b5259b9b487b34c24 100644 (file)
@@ -147,7 +147,8 @@ bool PruneEH::runOnSCC(CallGraphSCC &SCC) {
       Function *F = (*I)->getFunction();
       const AttrListPtr &PAL = F->getAttributes();
       const AttrListPtr &NPAL = PAL.addAttr(F->getContext(), ~0,
-                                            Attributes::get(NewAttributes));
+                                            Attributes::get(F->getContext(),
+                                                            NewAttributes));
       if (PAL != NPAL) {
         MadeChange = true;
         F->setAttributes(NPAL);