ir: Store enum declarations instead of just expressions.