From 4db65fe0cd02b3cc49d4fc8ff6c4c21a9ddb3642 Mon Sep 17 00:00:00 2001 From: Douglas Raillard Date: Mon, 18 Oct 2021 14:16:21 +0100 Subject: [PATCH] core: Export tag__natural_alignment() We'll use it in the BTF loader. Signed-off-by: Douglas Raillard [ Split from a larger patch ] Signed-off-by: Arnaldo Carvalho de Melo --- dwarves.c | 2 +- dwarves.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/dwarves.c b/dwarves.c index b6f2489..bb8af5b 100644 --- a/dwarves.c +++ b/dwarves.c @@ -1515,7 +1515,7 @@ void class__find_holes(struct class *class) static size_t type__natural_alignment(struct type *type, const struct cu *cu); -static size_t tag__natural_alignment(struct tag *tag, const struct cu *cu) +size_t tag__natural_alignment(struct tag *tag, const struct cu *cu) { size_t natural_alignment = 1; diff --git a/dwarves.h b/dwarves.h index 0bc24eb..b8edfa0 100644 --- a/dwarves.h +++ b/dwarves.h @@ -1007,6 +1007,8 @@ struct type { void __type__init(struct type *type); +size_t tag__natural_alignment(struct tag *tag, const struct cu *cu); + static inline struct class *type__class(const struct type *type) { return (struct class *)type;