fprintf: Do not print the __aligned__ attribute if asked

I.e. honour conf_fprintf.suppress_aligned_attribute, noticed with
btfdiff, as BTF doesn't carries the alignment attribute, so can't
regenerate it, we need to suppress it so as to compare the output of
DWARF with that of the equivalent BTF.

Fixes: b42d77b0bb ("fprintf: Print __attribute__((__aligned__(N))) for structs/classes")
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
Arnaldo Carvalho de Melo 2019-04-10 18:34:16 -03:00
parent ea583dac52
commit f77a442f09
1 changed files with 1 additions and 1 deletions

View File

@ -1668,7 +1668,7 @@ out:
if (cconf.suffix)
printed += fprintf(fp, " %s", cconf.suffix);
if (type->alignment != 0)
if (!cconf.suppress_aligned_attribute && type->alignment != 0)
printed += fprintf(fp, " __attribute__((__aligned__(%u)))", type->alignment);
return printed;