Can GlobalAlias be null?


Looking through constant folding code, we currently have an assumption that GlobalAliases may be null:

However, it’s not really clear to me under which circumstances this can happen. LLVM only allows aliases to definitions, not declarations, so an alias to an extern_weak symbol is not possible. LLVM supports weak aliases, but as far as I understand, these also cannot be null (as at least the aliased symbol is definitely defined, and will be used if there is no definition of the alias itself).

Is this an outdated check, or am I missing something?