[cfe-commits] r98441 - in /cfe/trunk: lib/CodeGen/CodeGenModule.cpp lib/CodeGen/CodeGenModule.h test/CXX/temp/temp.spec/temp.explicit/p1-emit.cpp test/CodeGenCXX/explicit-instantiation.cpp test/CodeGenCXX/mangle-exprs.cpp test/CodeGenCXX/mangle-t

Rafael Espindola espindola at google.com
Mon Mar 15 07:57:57 PDT 2010

> +  } else if (Linkage == GVA_ExplicitTemplateInstantiation) {
> +    // An explicit instantiation of a template has weak linkage, since
> +    // explicit instantiations can occur in multiple translation units
> +    // and must all be equivalent. However, we are not allowed to
> +    // throw away these explicit instantiations.
> +    return llvm::Function::WeakODRLinkage;

Just for curiosity, why does the c++ standard allows explicit
instantiations in multiple translation units? I don't see the use of
that and making a strong definition would make the linking more

Rafael Ávila de Espíndola

More information about the cfe-commits mailing list