summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2018-02-28 23:54:23 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2018-02-28 23:54:23 +0000
commit285271cb78f449f211bec34b4e954153feb0add9 (patch)
tree5a5c1f07ffbdf4bd0b4bd277a8a3aa4577b66115 /clang/lib/CodeGen/CodeGenModule.cpp
parent12a4dc4c34890d7d158ac95a0fb3e63281e596a0 (diff)
downloadbcm5719-llvm-285271cb78f449f211bec34b4e954153feb0add9.tar.gz
bcm5719-llvm-285271cb78f449f211bec34b4e954153feb0add9.zip
Pass a GlobalDecl to setNonAliasAttributes. NFC.
Also part of D43900. llvm-svn: 326388
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenModule.cpp7
1 files changed, 4 insertions, 3 deletions
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,
OpenPOWER on IntegriCloud