lib: create a clock class object from component
[babeltrace.git] / plugins / ctf / common / metadata / visitor-generate-ir.c
index ac1d2e9d653c33523a1a9e8b19c745e54e06fd60..a34cbf2619fc69cb6554760273773090515f779e 100644 (file)
@@ -193,6 +193,7 @@ struct ctx_decl_scope {
  * Visitor context (private).
  */
 struct ctx {
+       bt_self_component_source *self_comp;
        /* Trace IR trace class being filled (owned by this) */
        bt_trace_class *trace_class;
 
@@ -590,6 +591,7 @@ struct ctx *ctx_create(bt_self_component_source *self_comp,
                        BT_LOGE_STR("Cannot create empty trace class.");
                        goto error;
                }
+               ctx->self_comp = self_comp;
        }
 
        ctx->ctf_tc = ctf_trace_class_create();
@@ -5068,7 +5070,8 @@ int ctf_visitor_generate_ir_visit_node(struct ctf_visitor_generate_ir *visitor,
 
        if (ctx->trace_class) {
                /* Copy new CTF metadata -> new IR metadata */
-               ret = ctf_trace_class_translate(ctx->trace_class, ctx->ctf_tc);
+               ret = ctf_trace_class_translate(ctx->self_comp,
+                               ctx->trace_class, ctx->ctf_tc);
                if (ret) {
                        ret = -EINVAL;
                        goto end;
This page took 0.023681 seconds and 4 git commands to generate.