From e4e78135acbd0b5c2840f687d4ad93a1c9335a12 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Thu, 1 Mar 2018 00:00:02 +0000 Subject: [PATCH] Inline a trivial function. NFC. llvm-svn: 326391 --- clang/lib/CodeGen/CGCXX.cpp | 2 +- clang/lib/CodeGen/CodeGenModule.cpp | 7 +------ clang/lib/CodeGen/CodeGenModule.h | 3 --- 3 files changed, 2 insertions(+), 10 deletions(-) diff --git a/clang/lib/CodeGen/CGCXX.cpp b/clang/lib/CodeGen/CGCXX.cpp index e56be9c..c5c057e 100644 --- a/clang/lib/CodeGen/CGCXX.cpp +++ b/clang/lib/CodeGen/CGCXX.cpp @@ -230,7 +230,7 @@ llvm::Function *CodeGenModule::codegenCXXStructor(const CXXMethodDecl *MD, setFunctionDLLStorageClass(GD, Fn); CodeGenFunction(*this).GenerateCode(GD, Fn, FnInfo); - setFunctionDefinitionAttributes(GD, Fn); + setNonAliasAttributes(GD, Fn); SetLLVMFunctionAttributesForDefinition(MD, Fn); return Fn; } diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index 749578c..21dbcf3 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -1080,11 +1080,6 @@ llvm::ConstantInt *CodeGenModule::CreateCrossDsoCfiTypeId(llvm::Metadata *MD) { return llvm::ConstantInt::get(Int64Ty, llvm::MD5Hash(MDS->getString())); } -void CodeGenModule::setFunctionDefinitionAttributes(GlobalDecl GD, - llvm::Function *F) { - setNonAliasAttributes(GD, F); -} - void CodeGenModule::SetLLVMFunctionAttributes(const Decl *D, const CGFunctionInfo &Info, llvm::Function *F) { @@ -3593,7 +3588,7 @@ void CodeGenModule::EmitGlobalFunctionDefinition(GlobalDecl GD, CodeGenFunction(*this).GenerateCode(D, Fn, FI); - setFunctionDefinitionAttributes(GD, Fn); + setNonAliasAttributes(GD, Fn); SetLLVMFunctionAttributesForDefinition(D, Fn); if (const ConstructorAttr *CA = D->getAttr()) diff --git a/clang/lib/CodeGen/CodeGenModule.h b/clang/lib/CodeGen/CodeGenModule.h index 71b130b..19fbb22 100644 --- a/clang/lib/CodeGen/CodeGenModule.h +++ b/clang/lib/CodeGen/CodeGenModule.h @@ -1182,9 +1182,6 @@ public: bool TryEmitDefinitionAsAlias(GlobalDecl Alias, GlobalDecl Target); bool TryEmitBaseDestructorAsAlias(const CXXDestructorDecl *D); - /// Set attributes for a global definition. - void setFunctionDefinitionAttributes(GlobalDecl GD, llvm::Function *F); - llvm::GlobalValue *GetGlobalValue(StringRef Ref); /// Set attributes which are common to any form of a global definition (alias, -- 2.7.4