CreateFunctionTypeMetadata(FD, F);
}
-void CodeGenModule::SetCommonAttributes(const Decl *D,
- llvm::GlobalValue *GV) {
+void CodeGenModule::SetCommonAttributes(GlobalDecl GD, llvm::GlobalValue *GV) {
+ const Decl *D = GD.getDecl();
if (const auto *ND = dyn_cast_or_null<NamedDecl>(D))
setGVProperties(GV, ND);
else
void CodeGenModule::setAliasAttributes(GlobalDecl GD, llvm::GlobalValue *GV) {
const Decl *D = GD.getDecl();
- SetCommonAttributes(D, GV);
+ SetCommonAttributes(GD, GV);
// Process the dllexport attribute based on whether the original definition
// (not necessarily the aliasee) was exported.
void CodeGenModule::setNonAliasAttributes(GlobalDecl GD,
llvm::GlobalObject *GO) {
const Decl *D = GD.getDecl();
- SetCommonAttributes(D, GO);
+ SetCommonAttributes(GD, GO);
if (D) {
if (auto *GV = dyn_cast<llvm::GlobalVariable>(GO)) {
} else
GIF->setName(MangledName);
- SetCommonAttributes(D, GIF);
+ SetCommonAttributes(GD, GIF);
}
llvm::Function *CodeGenModule::getIntrinsic(unsigned IID,
/// Objective-C method, function, global variable).
///
/// NOTE: This should only be called for definitions.
- void SetCommonAttributes(const Decl *D, llvm::GlobalValue *GV);
+ void SetCommonAttributes(GlobalDecl GD, llvm::GlobalValue *GV);
/// Set attributes which must be preserved by an alias. This includes common
/// attributes (i.e. it includes a call to SetCommonAttributes).