Replace MarkVarRequired with a more generic

HandleCXXStaticMemberVarInstantiation. Suggested by Argyrios.

llvm-svn: 152320
This commit is contained in:
Rafael Espindola
2012-03-08 15:51:03 +00:00
parent 3cbe5cfff3
commit df88f6fe98
8 changed files with 22 additions and 21 deletions

View File

@@ -1722,8 +1722,12 @@ static void ReplaceUsesOfNonProtoTypeWithRealFunction(llvm::GlobalValue *Old,
}
}
void CodeGenModule::MarkVarRequired(VarDecl *VD) {
GetAddrOfGlobalVar(VD);
void CodeGenModule::HandleCXXStaticMemberVarInstantiation(VarDecl *VD) {
TemplateSpecializationKind TSK = VD->getTemplateSpecializationKind();
// If we have a definition, this might be a deferred decl. If the
// instantiation is explicit, make sure we emit it at the end.
if (VD->getDefinition() && TSK == TSK_ExplicitInstantiationDefinition)
GetAddrOfGlobalVar(VD);
}
void CodeGenModule::EmitGlobalFunctionDefinition(GlobalDecl GD) {