Attributes Rewrite
[oota-llvm.git] / lib / VMCore / AutoUpgrade.cpp
index 094ca755132c006e83977a43dbd4aff467ce33df..5fff460e8bc4fa636a709e995c60fe591906ec5c 100644 (file)
@@ -148,7 +148,8 @@ bool llvm::UpgradeIntrinsicFunction(Function *F, Function *&NewFn) {
   if (NewFn)
     F = NewFn;
   if (unsigned id = F->getIntrinsicID())
-    F->setAttributes(Intrinsic::getAttributes((Intrinsic::ID)id));
+    F->setAttributes(Intrinsic::getAttributes(F->getContext(),
+                                              (Intrinsic::ID)id));
   return Upgraded;
 }