aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/Analysis.cpp
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2022-01-15 22:14:16 +0100
committerNikita Popov <nikita.ppv@gmail.com>2022-01-15 22:39:31 +0100
commitc63a3175c2947e8c1a2d3bbe16a8586600705c54 (patch)
tree805c0ccdb58ef753a97ec9c4ee64a707247cbd54 /llvm/lib/CodeGen/Analysis.cpp
parentc84b8be516bcc4d021ff804169d58a7b3104e050 (diff)
downloadllvm-c63a3175c2947e8c1a2d3bbe16a8586600705c54.zip
llvm-c63a3175c2947e8c1a2d3bbe16a8586600705c54.tar.gz
llvm-c63a3175c2947e8c1a2d3bbe16a8586600705c54.tar.bz2
[AttrBuilder] Remove ctor accepting AttributeList and Index
Use the AttributeSet constructor instead. There's no good reason why AttrBuilder itself should exact the AttributeSet from the AttributeList. Moving this out of the AttrBuilder generally results in cleaner code.
Diffstat (limited to 'llvm/lib/CodeGen/Analysis.cpp')
-rw-r--r--llvm/lib/CodeGen/Analysis.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/Analysis.cpp b/llvm/lib/CodeGen/Analysis.cpp
index 4c05d8ba..e8fef50 100644
--- a/llvm/lib/CodeGen/Analysis.cpp
+++ b/llvm/lib/CodeGen/Analysis.cpp
@@ -577,9 +577,9 @@ bool llvm::attributesPermitTailCall(const Function *F, const Instruction *I,
bool &ADS = AllowDifferingSizes ? *AllowDifferingSizes : DummyADS;
ADS = true;
- AttrBuilder CallerAttrs(F->getContext(), F->getAttributes(), AttributeList::ReturnIndex);
- AttrBuilder CalleeAttrs(F->getContext(), cast<CallInst>(I)->getAttributes(),
- AttributeList::ReturnIndex);
+ AttrBuilder CallerAttrs(F->getContext(), F->getAttributes().getRetAttrs());
+ AttrBuilder CalleeAttrs(F->getContext(),
+ cast<CallInst>(I)->getAttributes().getRetAttrs());
// Following attributes are completely benign as far as calling convention
// goes, they shouldn't affect whether the call is a tail call.