[clang] 9b35254 - [NFC][Clang] Remove unused function `CodeGenModule::addDefaultFunctionDefinitionAttributes`
Juan Manuel MARTINEZ CAAMAÑO via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 30 01:38:44 PDT 2023
Author: Juan Manuel MARTINEZ CAAMAÑO
Date: 2023-08-30T10:32:51+02:00
New Revision: 9b352540184e181d2a38423d352c5d5e2142839e
URL: https://github.com/llvm/llvm-project/commit/9b352540184e181d2a38423d352c5d5e2142839e
DIFF: https://github.com/llvm/llvm-project/commit/9b352540184e181d2a38423d352c5d5e2142839e.diff
LOG: [NFC][Clang] Remove unused function `CodeGenModule::addDefaultFunctionDefinitionAttributes`
This patch deletes the unused `addDefaultFunctionDefinitionAttributes(llvm::Function);` function,
while it still keeps `void addDefaultFunctionDefinitionAttributes(llvm::AttrBuilder &attrs);` which is being used.
Differential Revision: https://reviews.llvm.org/D158990
Added:
Modified:
clang/lib/CodeGen/CGCall.cpp
clang/lib/CodeGen/CodeGenModule.h
Removed:
################################################################################
diff --git a/clang/lib/CodeGen/CGCall.cpp b/clang/lib/CodeGen/CGCall.cpp
index 7127bbb0450e93..01bbbd7371aad4 100644
--- a/clang/lib/CodeGen/CGCall.cpp
+++ b/clang/lib/CodeGen/CGCall.cpp
@@ -2094,14 +2094,6 @@ void CodeGenModule::getDefaultFunctionAttributes(StringRef Name,
addMergableDefaultFunctionAttributes(CodeGenOpts, FuncAttrs);
}
-void CodeGenModule::addDefaultFunctionDefinitionAttributes(llvm::Function &F) {
- llvm::AttrBuilder FuncAttrs(F.getContext());
- getDefaultFunctionAttributes(F.getName(), F.hasOptNone(),
- /* AttrOnCallSite = */ false, FuncAttrs);
- // TODO: call GetCPUAndFeaturesAttributes?
- F.addFnAttrs(FuncAttrs);
-}
-
/// Apply default attributes to \p F, accounting for merge semantics of
/// attributes that should not overwrite existing attributes.
void CodeGenModule::mergeDefaultFunctionDefinitionAttributes(
diff --git a/clang/lib/CodeGen/CodeGenModule.h b/clang/lib/CodeGen/CodeGenModule.h
index d4032aa6feb950..c8fc068bde7bba 100644
--- a/clang/lib/CodeGen/CodeGenModule.h
+++ b/clang/lib/CodeGen/CodeGenModule.h
@@ -1276,7 +1276,6 @@ class CodeGenModule : public CodeGenTypeCache {
/// on the function more conservative. But it's unsafe to call this on a
/// function which relies on particular fast-math attributes for correctness.
/// It's up to you to ensure that this is safe.
- void addDefaultFunctionDefinitionAttributes(llvm::Function &F);
void mergeDefaultFunctionDefinitionAttributes(llvm::Function &F,
bool WillInternalize);
More information about the cfe-commits
mailing list