mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-29 10:32:47 +00:00
Function attributes have index ~0, not 0
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96370 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
6bc1b51377
commit
f1ac0fd347
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user