[clang] [nfc][clang] Rename function (PR #137874)
Prabhu Rajasekaran via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 29 13:52:45 PDT 2025
https://github.com/Prabhuk updated https://github.com/llvm/llvm-project/pull/137874
>From 45778ad1a6cd0d7ce6333f6e8b69d4f4138b962e Mon Sep 17 00:00:00 2001
From: prabhukr <prabhukr at google.com>
Date: Tue, 29 Apr 2025 13:43:32 -0700
Subject: [PATCH] [nfc][clang] Rename function
Rename function to meet the coding guidelines. I am working on a similar
function in a subsequent PR. Landing this as NFC first to isolate this
change.
---
clang/lib/CodeGen/CodeGenModule.cpp | 6 +++---
clang/lib/CodeGen/CodeGenModule.h | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp
index e917f3c42da06..447204d6c23af 100644
--- a/clang/lib/CodeGen/CodeGenModule.cpp
+++ b/clang/lib/CodeGen/CodeGenModule.cpp
@@ -2661,7 +2661,7 @@ void CodeGenModule::SetLLVMFunctionAttributesForDefinition(const Decl *D,
// Skip available_externally functions. They won't be codegen'ed in the
// current module anyway.
if (getContext().GetGVALinkageForFunction(FD) != GVA_AvailableExternally)
- CreateFunctionTypeMetadataForIcall(FD, F);
+ createFunctionTypeMetadataForIcall(FD, F);
}
}
@@ -2868,7 +2868,7 @@ static void setLinkageForGV(llvm::GlobalValue *GV, const NamedDecl *ND) {
GV->setLinkage(llvm::GlobalValue::ExternalWeakLinkage);
}
-void CodeGenModule::CreateFunctionTypeMetadataForIcall(const FunctionDecl *FD,
+void CodeGenModule::createFunctionTypeMetadataForIcall(const FunctionDecl *FD,
llvm::Function *F) {
// Only if we are checking indirect calls.
if (!LangOpts.Sanitize.has(SanitizerKind::CFIICall))
@@ -3016,7 +3016,7 @@ void CodeGenModule::SetFunctionAttributes(GlobalDecl GD, llvm::Function *F,
// jump table.
if (!CodeGenOpts.SanitizeCfiCrossDso ||
!CodeGenOpts.SanitizeCfiCanonicalJumpTables)
- CreateFunctionTypeMetadataForIcall(FD, F);
+ createFunctionTypeMetadataForIcall(FD, F);
if (LangOpts.Sanitize.has(SanitizerKind::KCFI))
setKCFIType(FD, F);
diff --git a/clang/lib/CodeGen/CodeGenModule.h b/clang/lib/CodeGen/CodeGenModule.h
index 59f400570fb7a..1db5c3bc4e4ef 100644
--- a/clang/lib/CodeGen/CodeGenModule.h
+++ b/clang/lib/CodeGen/CodeGenModule.h
@@ -1633,7 +1633,7 @@ class CodeGenModule : public CodeGenTypeCache {
llvm::Metadata *CreateMetadataIdentifierGeneralized(QualType T);
/// Create and attach type metadata to the given function.
- void CreateFunctionTypeMetadataForIcall(const FunctionDecl *FD,
+ void createFunctionTypeMetadataForIcall(const FunctionDecl *FD,
llvm::Function *F);
/// Set type metadata to the given function.
More information about the cfe-commits
mailing list