diff options
author | Juan Manuel MARTINEZ CAAMAÑO <juamarti@amd.com> | 2023-08-31 14:35:06 +0200 |
---|---|---|
committer | Juan Manuel MARTINEZ CAAMAÑO <juamarti@amd.com> | 2023-08-31 14:47:42 +0200 |
commit | 19550e79b50f0689404309a2c6091f0b53770e08 (patch) | |
tree | a1dc62c4846b6e67e325b460c9e03dd759b7ea66 /clang/lib/CodeGen/CGCall.cpp | |
parent | 9536bbe464c8b53b75c485b2da607326dcd41929 (diff) | |
download | llvm-19550e79b50f0689404309a2c6091f0b53770e08.zip llvm-19550e79b50f0689404309a2c6091f0b53770e08.tar.gz llvm-19550e79b50f0689404309a2c6091f0b53770e08.tar.bz2 |
[NFC][Clang] Remove redundant function definitions
There were 3 definitions of the mergeDefaultFunctionDefinitionAttributes
function: A private implementation, a version exposed in CodeGen, a
version exposed in CodeGenModule.
This patch removes the private and the CodeGenModule versions and keeps
a single definition in CodeGen.
Reviewed By: jhuber6
Differential Revision: https://reviews.llvm.org/D159256
Diffstat (limited to 'clang/lib/CodeGen/CGCall.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGCall.cpp | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/clang/lib/CodeGen/CGCall.cpp b/clang/lib/CodeGen/CGCall.cpp index 01bbbd7..af05eec 100644 --- a/clang/lib/CodeGen/CGCall.cpp +++ b/clang/lib/CodeGen/CGCall.cpp @@ -2002,10 +2002,7 @@ static void getTrivialDefaultFunctionAttributes( } } -/// Adds attributes to \p F according to our \p CodeGenOpts and \p LangOpts, as -/// though we had emitted it ourselves. We remove any attributes on F that -/// conflict with the attributes we add here. -static void mergeDefaultFunctionDefinitionAttributes( +void CodeGen::mergeDefaultFunctionDefinitionAttributes( llvm::Function &F, const CodeGenOptions &CodeGenOpts, const LangOptions &LangOpts, const TargetOptions &TargetOpts, bool WillInternalize) { @@ -2065,15 +2062,6 @@ static void mergeDefaultFunctionDefinitionAttributes( F.addFnAttrs(FuncAttrs); } -void clang::CodeGen::mergeDefaultFunctionDefinitionAttributes( - llvm::Function &F, const CodeGenOptions CodeGenOpts, - const LangOptions &LangOpts, const TargetOptions &TargetOpts, - bool WillInternalize) { - - ::mergeDefaultFunctionDefinitionAttributes(F, CodeGenOpts, LangOpts, - TargetOpts, WillInternalize); -} - void CodeGenModule::getTrivialDefaultFunctionAttributes( StringRef Name, bool HasOptnone, bool AttrOnCallSite, llvm::AttrBuilder &FuncAttrs) { @@ -2094,15 +2082,6 @@ void CodeGenModule::getDefaultFunctionAttributes(StringRef Name, addMergableDefaultFunctionAttributes(CodeGenOpts, FuncAttrs); } -/// Apply default attributes to \p F, accounting for merge semantics of -/// attributes that should not overwrite existing attributes. -void CodeGenModule::mergeDefaultFunctionDefinitionAttributes( - llvm::Function &F, bool WillInternalize) { - ::mergeDefaultFunctionDefinitionAttributes(F, getCodeGenOpts(), getLangOpts(), - getTarget().getTargetOpts(), - WillInternalize); -} - void CodeGenModule::addDefaultFunctionDefinitionAttributes( llvm::AttrBuilder &attrs) { getDefaultFunctionAttributes(/*function name*/ "", /*optnone*/ false, |