core: class__clone() doesn't need a 'cu' arg
Since we stopped using per-cu obstacks we don't need it. If we ever want to use it we can do per thread obstacks. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
2b2014187b
commit
0f54ca9c82
|
@ -352,7 +352,7 @@ static struct class *class__clone_base_types(const struct tag *tag,
|
||||||
{
|
{
|
||||||
struct class *class = tag__class(tag);
|
struct class *class = tag__class(tag);
|
||||||
struct class_member *pos, *next;
|
struct class_member *pos, *next;
|
||||||
struct class *clone = class__clone(class, new_class_name, cu);
|
struct class *clone = class__clone(class, new_class_name);
|
||||||
|
|
||||||
if (clone == NULL)
|
if (clone == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
|
@ -1198,8 +1198,7 @@ static int type__clone_members(struct type *type, const struct type *from)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct class *class__clone(const struct class *from,
|
struct class *class__clone(const struct class *from, const char *new_class_name)
|
||||||
const char *new_class_name, struct cu *cu)
|
|
||||||
{
|
{
|
||||||
struct class *class = malloc(sizeof(*class));
|
struct class *class = malloc(sizeof(*class));
|
||||||
|
|
||||||
|
|
|
@ -1114,8 +1114,7 @@ static inline struct tag *class__tag(const struct class *cls)
|
||||||
return (struct tag *)cls;
|
return (struct tag *)cls;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct class *class__clone(const struct class *from,
|
struct class *class__clone(const struct class *from, const char *new_class_name);
|
||||||
const char *new_class_name, struct cu *cu);
|
|
||||||
void class__delete(struct class *cls);
|
void class__delete(struct class *cls);
|
||||||
|
|
||||||
static inline struct list_head *class__tags(struct class *cls)
|
static inline struct list_head *class__tags(struct class *cls)
|
||||||
|
|
4
pahole.c
4
pahole.c
|
@ -352,7 +352,7 @@ static int class__packable(struct class *class, struct cu *cu)
|
||||||
if (class->nr_holes == 0 && class->nr_bit_holes == 0)
|
if (class->nr_holes == 0 && class->nr_bit_holes == 0)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
clone = class__clone(class, NULL, cu);
|
clone = class__clone(class, NULL);
|
||||||
if (clone == NULL)
|
if (clone == NULL)
|
||||||
return 0;
|
return 0;
|
||||||
class__reorganize(clone, cu, 0, stdout);
|
class__reorganize(clone, cu, 0, stdout);
|
||||||
|
@ -1363,7 +1363,7 @@ static void do_reorg(struct tag *class, struct cu *cu)
|
||||||
int savings;
|
int savings;
|
||||||
const uint8_t reorg_verbose =
|
const uint8_t reorg_verbose =
|
||||||
show_reorg_steps ? 2 : global_verbose;
|
show_reorg_steps ? 2 : global_verbose;
|
||||||
struct class *clone = class__clone(tag__class(class), NULL, cu);
|
struct class *clone = class__clone(tag__class(class), NULL);
|
||||||
if (clone == NULL) {
|
if (clone == NULL) {
|
||||||
fprintf(stderr, "pahole: out of memory!\n");
|
fprintf(stderr, "pahole: out of memory!\n");
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
|
|
Loading…
Reference in New Issue