On Oct 14, 2009, at 2:34 PM, John McCall wrote:

> 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.

Good catch. Fixed in r84142.

        - Doug
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to