From 285271cb78f449f211bec34b4e954153feb0add9 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Wed, 28 Feb 2018 23:54:23 +0000 Subject: Pass a GlobalDecl to setNonAliasAttributes. NFC. Also part of D43900. llvm-svn: 326388 --- clang/lib/CodeGen/CodeGenModule.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'clang/lib/CodeGen/CodeGenModule.cpp') diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index fad3034f4d6..749578c91ad 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -1082,7 +1082,7 @@ llvm::ConstantInt *CodeGenModule::CreateCrossDsoCfiTypeId(llvm::Metadata *MD) { void CodeGenModule::setFunctionDefinitionAttributes(GlobalDecl GD, llvm::Function *F) { - setNonAliasAttributes(GD.getDecl(), F); + setNonAliasAttributes(GD, F); } void CodeGenModule::SetLLVMFunctionAttributes(const Decl *D, @@ -1304,8 +1304,9 @@ bool CodeGenModule::GetCPUAndFeaturesAttributes(const Decl *D, return AddedAttr; } -void CodeGenModule::setNonAliasAttributes(const Decl *D, +void CodeGenModule::setNonAliasAttributes(GlobalDecl GD, llvm::GlobalObject *GO) { + const Decl *D = GD.getDecl(); SetCommonAttributes(D, GO); if (D) { @@ -1350,7 +1351,7 @@ void CodeGenModule::SetInternalFunctionAttributes(GlobalDecl GD, F->setLinkage(llvm::Function::InternalLinkage); - setNonAliasAttributes(D, F); + setNonAliasAttributes(GD, F); } static void setLinkageForGV(llvm::GlobalValue *GV, -- cgit v1.2.3