[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:
Arnaldo Carvalho de Melo 2008-01-14 15:39:41 -02:00
parent 8aa8c0b571
commit 48f5b0d824
2 changed files with 8 additions and 0 deletions

View File

@ -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) {

View File

@ -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,