diff --git a/clang/lib/CodeGen/CGCall.cpp b/clang/lib/CodeGen/CGCall.cpp index 7127bbb0450e9..01bbbd7371aad 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 d4032aa6feb95..c8fc068bde7bb 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);