[llvm-commits] LibCallAliasAnalysis should be in anonymous namespace

Chris Lattner clattner at apple.com
Fri May 9 14:05:33 PDT 2008


On May 9, 2008, at 1:38 PM, Török Edwin wrote:

> Matthijs Kooijman wrote:
>> Hi,
>>
>>
>>> -namespace llvm {
>>> +namespace {
>>>   /// LibCallAliasAnalysis - Alias analysis driven from LibCallInfo.
>>>   struct LibCallAliasAnalysis : public FunctionPass, AliasAnalysis {
>>>     static char ID; // Class identification
>>>
>> Following other examples, shouldn't there also be a  
>> VISIBILITY_HIDDEN put in
>> there somewhere?
>
> Probably yes, however I don't understand what implications
> VISIBILITY_HIDDEN has,
> so I have only commited the namespace change for now.
> I would leave the VISIBILITY_HIDDEN stuff till after the release.

Marking stuff VISIBILITY_HIDDEN was a horrible hack to work around a  
bug in GCC's older than 4.2.  This bug manifested itself in poor  
performance, not a correctness issue.  I think I was the only one who  
cared about this before, and now care about 4.2... so I'm ok if we  
decide to remove this entirely.

That said, we could wait a couple release to remove all of them,  
because gcc's prior to 4.2 are still in wide use.

-Chris



More information about the llvm-commits mailing list