mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-01 00:17:01 +00:00
s/AttrListPtr/AttributeSet/g to better label what this class is going to be in the near future.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169651 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1380,27 +1380,27 @@ void LLVMSetGC(LLVMValueRef Fn, const char *GC) {
|
||||
|
||||
void LLVMAddFunctionAttr(LLVMValueRef Fn, LLVMAttribute PA) {
|
||||
Function *Func = unwrap<Function>(Fn);
|
||||
const AttrListPtr PAL = Func->getAttributes();
|
||||
const AttributeSet PAL = Func->getAttributes();
|
||||
AttrBuilder B(PA);
|
||||
const AttrListPtr PALnew =
|
||||
PAL.addAttr(Func->getContext(), AttrListPtr::FunctionIndex,
|
||||
const AttributeSet PALnew =
|
||||
PAL.addAttr(Func->getContext(), AttributeSet::FunctionIndex,
|
||||
Attributes::get(Func->getContext(), B));
|
||||
Func->setAttributes(PALnew);
|
||||
}
|
||||
|
||||
void LLVMRemoveFunctionAttr(LLVMValueRef Fn, LLVMAttribute PA) {
|
||||
Function *Func = unwrap<Function>(Fn);
|
||||
const AttrListPtr PAL = Func->getAttributes();
|
||||
const AttributeSet PAL = Func->getAttributes();
|
||||
AttrBuilder B(PA);
|
||||
const AttrListPtr PALnew =
|
||||
PAL.removeAttr(Func->getContext(), AttrListPtr::FunctionIndex,
|
||||
const AttributeSet PALnew =
|
||||
PAL.removeAttr(Func->getContext(), AttributeSet::FunctionIndex,
|
||||
Attributes::get(Func->getContext(), B));
|
||||
Func->setAttributes(PALnew);
|
||||
}
|
||||
|
||||
LLVMAttribute LLVMGetFunctionAttr(LLVMValueRef Fn) {
|
||||
Function *Func = unwrap<Function>(Fn);
|
||||
const AttrListPtr PAL = Func->getAttributes();
|
||||
const AttributeSet PAL = Func->getAttributes();
|
||||
Attributes attr = PAL.getFnAttributes();
|
||||
return (LLVMAttribute)attr.Raw();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user