aboutsummaryrefslogtreecommitdiffstats
path: root/lib/VMCore/Core.cpp
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
commit1d12da6857cccfd9d4f3986e0b632aee0ce381bc (patch)
treea6b421ebc3cf569a81c360e7382511fc6cf42511 /lib/VMCore/Core.cpp
parente9f8fb3d804deba5ac8d5cd7fb7a964af4d6a171 (diff)
downloadexternal_llvm-1d12da6857cccfd9d4f3986e0b632aee0ce381bc.zip
external_llvm-1d12da6857cccfd9d4f3986e0b632aee0ce381bc.tar.gz
external_llvm-1d12da6857cccfd9d4f3986e0b632aee0ce381bc.tar.bz2
Function attributes have index ~0, not 0
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96370 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/Core.cpp')
-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 a044fc5..5883cdb 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);
}