summaryrefslogtreecommitdiffstats
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
commit10e3022b10d2a9ce18f91ccd9727221af9cd6d3c (patch)
tree07a235d93548a4b58bfdbeb77c7f606686267572
parent6c132331ee47e01d3de056aff2fd1bdb646246ac (diff)
downloadbcm5719-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.cpp4
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);
}
OpenPOWER on IntegriCloud