+static void walk_initializer(ir_initializer_t *initializer, walk_env *env)
+{
+ switch(initializer->kind) {
+ case IR_INITIALIZER_CONST:
+ irg_walk(initializer->consti.value, env->pre, env->post, env->env);
+ return;
+ case IR_INITIALIZER_TARVAL:
+ case IR_INITIALIZER_NULL:
+ return;
+
+ case IR_INITIALIZER_COMPOUND: {
+ size_t i;
+ for(i = 0; i < initializer->compound.n_initializers; ++i) {
+ ir_initializer_t *subinitializer
+ = initializer->compound.initializers[i];
+ walk_initializer(subinitializer, env);
+ }
+ return;
+ }
+ }
+ panic("invalid initializer found");
+}
+