Fix IR visitor: set min alignment on structure field type
[babeltrace.git] / plugins / ctf / common / metadata / visitor-generate-ir.c
index 2e175e75d7d967cb2ef66cdbef69380bcc4d43e7..b11625119a4fd2c0cbcc31dc5f6d8d7e4df79a66 100644 (file)
@@ -1818,6 +1818,15 @@ int visit_struct_decl(struct ctx *ctx, const char *name,
                        goto error;
                }
 
+               if (min_align_value != 0) {
+                       ret = bt_ctf_field_type_set_alignment(*struct_decl,
+                                       min_align_value);
+                       if (ret) {
+                               _PERROR("%s", "failed to set structure's minimal alignment");
+                               goto error;
+                       }
+               }
+
                ret = ctx_push_scope(ctx);
                if (ret) {
                        _PERROR("%s", "cannot push scope");
This page took 0.023413 seconds and 4 git commands to generate.