aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenneth Uildriks <kennethuil@gmail.com>2010-02-16 19:28:02 +0000
committerKenneth Uildriks <kennethuil@gmail.com>2010-02-16 19:28:02 +0000
commitf1ac0fd347823c5ab54577702f8eb062bf4ca70b (patch)
treea6b421ebc3cf569a81c360e7382511fc6cf42511
parent6bc1b51377d86c7f9ec422ab6962d3051dc92de2 (diff)
Function attributes have index ~0, not 0
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96370 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/VMCore/Core.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/VMCore/Core.cpp b/lib/VMCore/Core.cpp
index a044fc5b1a..5883cdbfbb 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<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);
}