return true;
}
-static char *ir_strdup(const char *str)
-{
- if (str && !*str) {
- /* actually dup empty strings */
- char *out = (char*)mem_a(1);
- *out = 0;
- return out;
- }
- return util_strdup(str);
-}
-
bool ir_value_set_string(ir_value *self, const char *str)
{
if (self->vtype != TYPE_STRING)
return false;
- self->constval.vstring = ir_strdup(str);
+ self->constval.vstring = util_strdupe(str);
self->hasvalue = true;
return true;
}
* is doing something wrong.
*/
irerror(self->context, "Invalid entry block for PHI");
- abort();
+ exit(EXIT_FAILURE);
}
pe.value = v;
def.offset++;
component[len-1]++;
}
+
+ mem_d(component);
}
static void gen_vector_fields(prog_section_field fld, const char *name)
fld.offset++;
component[len-1]++;
}
+
+ mem_d(component);
}
static bool ir_builder_gen_global(ir_builder *self, ir_value *global, bool islocal)