Douglas Gregor wrote:
> +static CodeGenModule::GVALinkage
> +GetLinkageForVariable(ASTContext &Context, const VarDecl *VD) {
> + // Everything located semantically within an anonymous namespace is
> + // always internal.
> + if (VD->isInAnonymousNamespace())
> + return CodeGenModule::GVA_Internal;
>
If you're going to check for anonymous namespaces here....
> @@ -1021,9 +1057,10 @@
> GV->setAlignment(getContext().getDeclAlignInBytes(D));
>
> // Set the llvm linkage type as appropriate.
> + GVALinkage Linkage = GetLinkageForVariable(getContext(), D);
> if (D->isInAnonymousNamespace())
> GV->setLinkage(llvm::Function::InternalLinkage);
>
You don't need to do it again here.
John.
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits