Attributes Rewrite
[oota-llvm.git] / include / llvm / Function.h
index f28aa5cdd7a7b0a0831486b87541d5fdda94a2d1..f36d5650b3e8f95b3f1efc0a51d25e0417a480b9 100644 (file)
@@ -180,7 +180,7 @@ public:
     // Function Attributes are stored at ~0 index 
     Attributes::Builder B;
     B.addAttribute(N);
-    addAttribute(~0U, Attributes::get(B));
+    addAttribute(~0U, Attributes::get(getContext(), B));
   }
 
   /// removeFnAttr - Remove function attributes from this function.
@@ -280,7 +280,7 @@ public:
   void setDoesNotAlias(unsigned n) {
     Attributes::Builder B;
     B.addAttribute(Attributes::NoAlias);
-    addAttribute(n, Attributes::get(B));
+    addAttribute(n, Attributes::get(getContext(), B));
   }
 
   /// @brief Determine if the parameter can be captured.
@@ -291,7 +291,7 @@ public:
   void setDoesNotCapture(unsigned n) {
     Attributes::Builder B;
     B.addAttribute(Attributes::NoCapture);
-    addAttribute(n, Attributes::get(B));
+    addAttribute(n, Attributes::get(getContext(), B));
   }
 
   /// copyAttributesFrom - copy all additional attributes (those not needed to