aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorNikita Popov <npopov@redhat.com>2025-03-20 15:01:37 +0100
committerNikita Popov <npopov@redhat.com>2025-03-20 15:04:03 +0100
commite6a87da8fe314a009eed769f9737b4b281a06fba (patch)
tree4e5f895b3aa7bd5b8c05d04585c55cfb4f6617d6 /clang/lib/CodeGen/CodeGenModule.cpp
parent9b1f905b483a2b42e4681bbef42b2641f8ccf5ad (diff)
downloadllvm-e6a87da8fe314a009eed769f9737b4b281a06fba.zip
llvm-e6a87da8fe314a009eed769f9737b4b281a06fba.tar.gz
llvm-e6a87da8fe314a009eed769f9737b4b281a06fba.tar.bz2
[CodeGen] Don't explicitly set intrinsic attributes (NFCI)
The intrinsic attributes are automatically set when the function is created, there is no need to assign them explicitly.
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenModule.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp
index e26c6c3..257b7b4 100644
--- a/clang/lib/CodeGen/CodeGenModule.cpp
+++ b/clang/lib/CodeGen/CodeGenModule.cpp
@@ -2936,9 +2936,8 @@ void CodeGenModule::SetFunctionAttributes(GlobalDecl GD, llvm::Function *F,
bool IsThunk) {
if (llvm::Intrinsic::ID IID = F->getIntrinsicID()) {
- // If this is an intrinsic function, set the function's attributes
- // to the intrinsic's attributes.
- F->setAttributes(llvm::Intrinsic::getAttributes(getLLVMContext(), IID));
+ // If this is an intrinsic function, the attributes will have been set
+ // when the function was created.
return;
}