Skip to content

Fix the design of GlobalAlias to not require dest type to match source type #10739

Closed
@lattner

Description

@lattner
Bugzilla Link 10367
Resolution FIXED
Resolved on Jun 02, 2014 21:54
Version 1.0
OS All
CC @asl,@majnemer,@jayfoad,@arsenm,@pcc,@rnk,@TNorthover

Extended Description

Global alias is currently defined to have its own type, and then have an initializer of the same type. The initializer is a "Constant*" which is either a) a global value, b) a constant expr bitcast, c) a constantexpr gep with all zero indices, d) null (which isn't valid, but transiently happens).

This doesn't make sense for a number of reasons. Instead, the initializer of a GlobalAlias should be required to be a GlobalValue, but the type of the source and dest of the alias should not be required to be the same, they should just be completely decoupled.

-Chris

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions