diff options
| author | Kenneth Uildriks <kennethuil@gmail.com> | 2010-02-16 19:28:02 +0000 |
|---|---|---|
| committer | Kenneth Uildriks <kennethuil@gmail.com> | 2010-02-16 19:28:02 +0000 |
| commit | 10e3022b10d2a9ce18f91ccd9727221af9cd6d3c (patch) | |
| tree | 07a235d93548a4b58bfdbeb77c7f606686267572 | |
| parent | 6c132331ee47e01d3de056aff2fd1bdb646246ac (diff) | |
| download | bcm5719-llvm-10e3022b10d2a9ce18f91ccd9727221af9cd6d3c.tar.gz bcm5719-llvm-10e3022b10d2a9ce18f91ccd9727221af9cd6d3c.zip | |
Function attributes have index ~0, not 0
llvm-svn: 96370
| -rw-r--r-- | llvm/lib/VMCore/Core.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/VMCore/Core.cpp b/llvm/lib/VMCore/Core.cpp index a044fc5b1a0..5883cdbfbbb 100644 --- a/llvm/lib/VMCore/Core.cpp +++ b/llvm/lib/VMCore/Core.cpp @@ -1215,14 +1215,14 @@ void LLVMSetGC(LLVMValueRef Fn, const char *GC) { 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); } |

