aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR/Attributes.cpp
diff options
context:
space:
mode:
authorArthur Eubanks <aeubanks@google.com>2021-08-16 17:12:49 -0700
committerArthur Eubanks <aeubanks@google.com>2021-08-17 21:05:40 -0700
commitad727ab7d9c21abe8b62df617d72e2c98d767561 (patch)
tree335de702a2d233f6ec7d52ae4afd30b372ad83a5 /llvm/lib/IR/Attributes.cpp
parent46cf82532cf1502b6320517a2ef42d8c435e598a (diff)
downloadllvm-ad727ab7d9c21abe8b62df617d72e2c98d767561.zip
llvm-ad727ab7d9c21abe8b62df617d72e2c98d767561.tar.gz
llvm-ad727ab7d9c21abe8b62df617d72e2c98d767561.tar.bz2
[NFC] Migrate some callers away from Function/AttributeLists methods that take an index
These methods can be confusing.
Diffstat (limited to 'llvm/lib/IR/Attributes.cpp')
-rw-r--r--llvm/lib/IR/Attributes.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/IR/Attributes.cpp b/llvm/lib/IR/Attributes.cpp
index 9bdaa56..9f665b4 100644
--- a/llvm/lib/IR/Attributes.cpp
+++ b/llvm/lib/IR/Attributes.cpp
@@ -1961,11 +1961,11 @@ static void adjustCallerSSPLevel(Function &Caller, const Function &Callee) {
.addAttribute(Attribute::StackProtectReq);
if (Callee.hasFnAttribute(Attribute::StackProtectReq)) {
- Caller.removeAttributes(AttributeList::FunctionIndex, OldSSPAttr);
+ Caller.removeFnAttrs(OldSSPAttr);
Caller.addFnAttr(Attribute::StackProtectReq);
} else if (Callee.hasFnAttribute(Attribute::StackProtectStrong) &&
!Caller.hasFnAttribute(Attribute::StackProtectReq)) {
- Caller.removeAttributes(AttributeList::FunctionIndex, OldSSPAttr);
+ Caller.removeFnAttrs(OldSSPAttr);
Caller.addFnAttr(Attribute::StackProtectStrong);
} else if (Callee.hasFnAttribute(Attribute::StackProtect) &&
!Caller.hasFnAttribute(Attribute::StackProtectReq) &&