@@ -1232,8 +1232,8 @@ void CodeGenModule::SetLLVMFunctionAttributesForDefinition(const Decl *D,
1232
1232
CreateFunctionTypeMetadata (FD, F);
1233
1233
}
1234
1234
1235
- void CodeGenModule::SetCommonAttributes (const Decl *D,
1236
- llvm::GlobalValue *GV) {
1235
+ void CodeGenModule::SetCommonAttributes (GlobalDecl GD, llvm::GlobalValue *GV) {
1236
+ const Decl *D = GD. getDecl ();
1237
1237
if (const auto *ND = dyn_cast_or_null<NamedDecl>(D))
1238
1238
setGVProperties (GV, ND);
1239
1239
else
@@ -1245,7 +1245,7 @@ void CodeGenModule::SetCommonAttributes(const Decl *D,
1245
1245
1246
1246
void CodeGenModule::setAliasAttributes (GlobalDecl GD, llvm::GlobalValue *GV) {
1247
1247
const Decl *D = GD.getDecl ();
1248
- SetCommonAttributes (D , GV);
1248
+ SetCommonAttributes (GD , GV);
1249
1249
1250
1250
// Process the dllexport attribute based on whether the original definition
1251
1251
// (not necessarily the aliasee) was exported.
@@ -1302,7 +1302,7 @@ bool CodeGenModule::GetCPUAndFeaturesAttributes(const Decl *D,
1302
1302
void CodeGenModule::setNonAliasAttributes (GlobalDecl GD,
1303
1303
llvm::GlobalObject *GO) {
1304
1304
const Decl *D = GD.getDecl ();
1305
- SetCommonAttributes (D , GO);
1305
+ SetCommonAttributes (GD , GO);
1306
1306
1307
1307
if (D) {
1308
1308
if (auto *GV = dyn_cast<llvm::GlobalVariable>(GO)) {
@@ -3731,7 +3731,7 @@ void CodeGenModule::emitIFuncDefinition(GlobalDecl GD) {
3731
3731
} else
3732
3732
GIF->setName (MangledName);
3733
3733
3734
- SetCommonAttributes (D , GIF);
3734
+ SetCommonAttributes (GD , GIF);
3735
3735
}
3736
3736
3737
3737
llvm::Function *CodeGenModule::getIntrinsic (unsigned IID,
0 commit comments