X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=include%2Fllvm%2FFunction.h;h=e211e9ab52a871b7ba9a8e29c037beeec614143b;hb=79b319d35589ffe9c00a5e112a79ad20ea78c4d5;hp=f28aa5cdd7a7b0a0831486b87541d5fdda94a2d1;hpb=ed84062812c7b8a82d0e8128a22aa1aa07a14d79;p=oota-llvm.git diff --git a/include/llvm/Function.h b/include/llvm/Function.h index f28aa5cdd7a..e211e9ab52a 100644 --- a/include/llvm/Function.h +++ b/include/llvm/Function.h @@ -178,9 +178,7 @@ public: /// void addFnAttr(Attributes::AttrVal N) { // Function Attributes are stored at ~0 index - Attributes::Builder B; - B.addAttribute(N); - addAttribute(~0U, Attributes::get(B)); + addAttribute(AttrListPtr::FunctionIndex, Attributes::get(getContext(), N)); } /// removeFnAttr - Remove function attributes from this function. @@ -278,9 +276,7 @@ public: return getParamAttributes(n).hasAttribute(Attributes::NoAlias); } void setDoesNotAlias(unsigned n) { - Attributes::Builder B; - B.addAttribute(Attributes::NoAlias); - addAttribute(n, Attributes::get(B)); + addAttribute(n, Attributes::get(getContext(), Attributes::NoAlias)); } /// @brief Determine if the parameter can be captured. @@ -289,9 +285,7 @@ public: return getParamAttributes(n).hasAttribute(Attributes::NoCapture); } void setDoesNotCapture(unsigned n) { - Attributes::Builder B; - B.addAttribute(Attributes::NoCapture); - addAttribute(n, Attributes::get(B)); + addAttribute(n, Attributes::get(getContext(), Attributes::NoCapture)); } /// copyAttributesFrom - copy all additional attributes (those not needed to