linkage types on global alias

I'm getting an error in the verifier after running a custom pass:

   Alias should have external or external weak linkage!

This constraint isn't mentioned in the LangRef. According to the verifier code, the only permitted linkage types for a GlobalAlias are external, internal and weak.

Why is that? The LangRef describes weak in terms of common, and common in terms of linkonce. Is there some semantic reason that an alias with common or linkonce wouldn't make sense, or is it just a case that this part of the verifier was never updated when new linkage types were added?

Nick

Hi Nick,

Why is that? The LangRef describes weak in terms of common, and common
in terms of linkonce. Is there some semantic reason that an alias with
common or linkonce wouldn't make sense,

Right. We're reflecting linkage specification from gcc, where alias
can be external, weak or internal (undocumented, but created by c++
frontend). As alias is purely linker stuff, there is no 'linkonce' or
'common' there. Symbol can be global, internal or weak.

part of the verifier was never updated when new linkage types were added?

No, verifier is correct. I'll update langref.