Skip to content

Commit e6a87da

Browse files
committed
[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.
1 parent 9b1f905 commit e6a87da

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

clang/lib/CodeGen/CodeGenModule.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2936,9 +2936,8 @@ void CodeGenModule::SetFunctionAttributes(GlobalDecl GD, llvm::Function *F,
29362936
bool IsThunk) {
29372937

29382938
if (llvm::Intrinsic::ID IID = F->getIntrinsicID()) {
2939-
// If this is an intrinsic function, set the function's attributes
2940-
// to the intrinsic's attributes.
2941-
F->setAttributes(llvm::Intrinsic::getAttributes(getLLVMContext(), IID));
2939+
// If this is an intrinsic function, the attributes will have been set
2940+
// when the function was created.
29422941
return;
29432942
}
29442943

0 commit comments

Comments
 (0)