tap-driver.sh: flush stdout after each test result
[babeltrace.git] / plugins / ctf / common / metadata / ctf-meta-update-in-ir.c
index 0cb95cf7a82a9b1b124cfbd66eab94e59e16a2db..806a9197368245abde9b665ccd86033d91e75a3d 100644 (file)
 #define BT_LOG_TAG "PLUGIN-CTF-METADATA-META-UPDATE-IN-IR"
 #include "logging.h"
 
-#include <babeltrace/babeltrace.h>
-#include <babeltrace/babeltrace-internal.h>
-#include <babeltrace/assert-internal.h>
-#include <babeltrace/compat/glib-internal.h>
+#include <babeltrace2/babeltrace.h>
+#include <babeltrace2/babeltrace-internal.h>
+#include <babeltrace2/assert-internal.h>
+#include <babeltrace2/compat/glib-internal.h>
 #include <glib.h>
 #include <stdint.h>
 #include <string.h>
 #include <inttypes.h>
+#include <assert.h>
 
 #include "ctf-meta-visitors.h"
 
@@ -118,6 +119,14 @@ void update_field_class_in_ir(struct ctf_field_class *fc,
        {
                struct ctf_field_class_struct *struct_fc = (void *) fc;
 
+               /*
+                * Make it part of IR if it's empty because it was
+                * originally empty.
+                */
+               if (struct_fc->members->len == 0) {
+                       fc->in_ir = true;
+               }
+
                /* Reverse order */
                for (i = (int64_t) struct_fc->members->len - 1; i >= 0; i--) {
                        struct ctf_named_field_class *named_fc =
This page took 0.023914 seconds and 4 git commands to generate.