[llvm-commits] [llvm] r96370 - /llvm/trunk/lib/VMCore/Core.cpp

Kenneth Uildriks kennethuil at gmail.com
Tue Feb 16 11:28:15 PST 2010


Author: kennethuil
Date: Tue Feb 16 13:28:02 2010
New Revision: 96370

URL: http://llvm.org/viewvc/llvm-project?rev=96370&view=rev
Log:
Function attributes have index ~0, not 0

Modified:
    llvm/trunk/lib/VMCore/Core.cpp

Modified: llvm/trunk/lib/VMCore/Core.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Core.cpp?rev=96370&r1=96369&r2=96370&view=diff

==============================================================================
--- llvm/trunk/lib/VMCore/Core.cpp (original)
+++ llvm/trunk/lib/VMCore/Core.cpp Tue Feb 16 13:28:02 2010
@@ -1215,14 +1215,14 @@
 void LLVMAddFunctionAttr(LLVMValueRef Fn, LLVMAttribute PA) {
   Function *Func = unwrap<Function>(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<Function>(Fn);
   const AttrListPtr PAL = Func->getAttributes();
-  const AttrListPtr PALnew = PAL.removeAttr(0, PA);
+  const AttrListPtr PALnew = PAL.removeAttr(~0U, PA);
   Func->setAttributes(PALnew);
 }
 





More information about the llvm-commits mailing list