summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
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