mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-24 22:24:54 +00:00
Remove addRetAttributes and addFnAttributes, which aren't useful abstractions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173992 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -147,10 +147,10 @@ bool PruneEH::runOnSCC(CallGraphSCC &SCC) {
|
||||
Function *F = (*I)->getFunction();
|
||||
const AttributeSet &PAL = F->getAttributes();
|
||||
const AttributeSet &NPAL =
|
||||
PAL.addFnAttributes(F->getContext(),
|
||||
AttributeSet::get(F->getContext(),
|
||||
AttributeSet::FunctionIndex,
|
||||
NewAttributes));
|
||||
PAL.addAttributes(F->getContext(), AttributeSet::FunctionIndex,
|
||||
AttributeSet::get(F->getContext(),
|
||||
AttributeSet::FunctionIndex,
|
||||
NewAttributes));
|
||||
if (PAL != NPAL) {
|
||||
MadeChange = true;
|
||||
F->setAttributes(NPAL);
|
||||
|
@@ -98,11 +98,13 @@ void llvm::CloneFunctionInto(Function *NewFunc, const Function *OldFunc,
|
||||
Anew->addAttr(OldFunc->getAttributes()
|
||||
.getParamAttributes(I->getArgNo() + 1));
|
||||
NewFunc->setAttributes(NewFunc->getAttributes()
|
||||
.addRetAttributes(NewFunc->getContext(),
|
||||
OldFunc->getAttributes()));
|
||||
.addAttributes(NewFunc->getContext(),
|
||||
AttributeSet::ReturnIndex,
|
||||
OldFunc->getAttributes()));
|
||||
NewFunc->setAttributes(NewFunc->getAttributes()
|
||||
.addFnAttributes(NewFunc->getContext(),
|
||||
OldFunc->getAttributes()));
|
||||
.addAttributes(NewFunc->getContext(),
|
||||
AttributeSet::FunctionIndex,
|
||||
OldFunc->getAttributes()));
|
||||
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user