From: Kenneth Uildriks Date: Tue, 16 Feb 2010 19:28:02 +0000 (+0000) Subject: Function attributes have index ~0, not 0 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=f1ac0fd347823c5ab54577702f8eb062bf4ca70b;p=oota-llvm.git Function attributes have index ~0, not 0 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96370 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/VMCore/Core.cpp b/lib/VMCore/Core.cpp index a044fc5b1a0..5883cdbfbbb 100644 --- a/lib/VMCore/Core.cpp +++ b/lib/VMCore/Core.cpp @@ -1215,14 +1215,14 @@ void LLVMSetGC(LLVMValueRef Fn, const char *GC) { void LLVMAddFunctionAttr(LLVMValueRef Fn, LLVMAttribute PA) { Function *Func = unwrap(Fn); const AttrListPtr PAL = Func->getAttributes(); - const AttrListPtr PALnew = PAL.addAttr(0, PA); + const AttrListPtr PALnew = PAL.addAttr(~0U, PA); Func->setAttributes(PALnew); } void LLVMRemoveFunctionAttr(LLVMValueRef Fn, LLVMAttribute PA) { Function *Func = unwrap(Fn); const AttrListPtr PAL = Func->getAttributes(); - const AttrListPtr PALnew = PAL.removeAttr(0, PA); + const AttrListPtr PALnew = PAL.removeAttr(~0U, PA); Func->setAttributes(PALnew); }