}
// Finally, set up the alias with its proper name and attributes.
- setAliasAttributes(cast<NamedDecl>(AliasDecl.getDecl()), Alias);
+ setAliasAttributes(AliasDecl, Alias);
return false;
}
addUsedGlobal(GV);
}
-void CodeGenModule::setAliasAttributes(const Decl *D,
- llvm::GlobalValue *GV) {
+void CodeGenModule::setAliasAttributes(GlobalDecl GD, llvm::GlobalValue *GV) {
+ const Decl *D = GD.getDecl();
SetCommonAttributes(D, GV);
// Process the dllexport attribute based on whether the original definition
if (VD->getTLSKind())
setTLSMode(GA, *VD);
- setAliasAttributes(D, GA);
+ setAliasAttributes(GD, GA);
}
void CodeGenModule::emitIFuncDefinition(GlobalDecl GD) {
/// attributes (i.e. it includes a call to SetCommonAttributes).
///
/// NOTE: This should only be called for definitions.
- void setAliasAttributes(const Decl *D, llvm::GlobalValue *GV);
+ void setAliasAttributes(GlobalDecl GD, llvm::GlobalValue *GV);
void addReplacement(StringRef Name, llvm::Constant *C);
}
// Finally, set up the alias with its proper name and attributes.
- CGM.setAliasAttributes(cast<NamedDecl>(AliasDecl.getDecl()), Alias);
+ CGM.setAliasAttributes(AliasDecl, Alias);
}
void ItaniumCXXABI::emitCXXStructor(const CXXMethodDecl *MD,