From e6a87da8fe314a009eed769f9737b4b281a06fba Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 20 Mar 2025 15:01:37 +0100 Subject: [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. --- clang/lib/CodeGen/CodeGenModule.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'clang/lib/CodeGen/CodeGenModule.cpp') 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; } -- cgit v1.1