[DWARVES]: Introduce cu__same_build_id
So that we can speed up codiff when just some object files changed in a multi-cu file. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
8aa8c0b571
commit
48f5b0d824
|
@ -718,6 +718,13 @@ static void cu__add_tag(struct cu *self, struct tag *tag)
|
|||
list_add_tail(&tag->node, &self->tags);
|
||||
}
|
||||
|
||||
bool cu__same_build_id(const struct cu *self, const struct cu *other)
|
||||
{
|
||||
return self->build_id_len != 0 &&
|
||||
self->build_id_len == other->build_id_len &&
|
||||
memcmp(self->build_id, other->build_id, self->build_id_len) == 0;
|
||||
}
|
||||
|
||||
static const char *tag__prefix(const struct cu *cu, const uint32_t tag)
|
||||
{
|
||||
switch (tag) {
|
||||
|
|
|
@ -487,6 +487,7 @@ extern struct tag *cu__find_first_typedef_of_type(const struct cu *self,
|
|||
extern struct tag *cu__find_struct_by_name(const struct cu *cu,
|
||||
const char *name,
|
||||
const int include_decls);
|
||||
extern bool cu__same_build_id(const struct cu *self, const struct cu *other);
|
||||
extern void cu__account_inline_expansions(struct cu *self);
|
||||
extern int cu__for_each_tag(struct cu *self,
|
||||
int (*iterator)(struct tag *tag,
|
||||
|
|
Loading…
Reference in New Issue