mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-22 11:55:12 +00:00
Function attributes have index ~0, not 0
llvm-svn: 96370
This commit is contained in:
parent
cafd2c75a1
commit
13195c9525
@ -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…
x
Reference in New Issue
Block a user