X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=src%2Fplugins%2Fctf%2Fcommon%2Fmetadata%2Fctf-meta-translate.c;h=27611bc6834d04a4fccb602ba872fe5b0e96a0f1;hb=fabfe03472e26e997f9bfaec3fb075e6dbb029dd;hp=7d0d966acc0fada002887d520aa22f6630bce880;hpb=6da709aa5711ee57761028c143fc00b65026c15d;p=babeltrace.git diff --git a/src/plugins/ctf/common/metadata/ctf-meta-translate.c b/src/plugins/ctf/common/metadata/ctf-meta-translate.c index 7d0d966a..27611bc6 100644 --- a/src/plugins/ctf/common/metadata/ctf-meta-translate.c +++ b/src/plugins/ctf/common/metadata/ctf-meta-translate.c @@ -134,13 +134,12 @@ bt_field_class *ctf_field_class_float_to_ir(struct ctx *ctx, { bt_field_class *ir_fc; - ir_fc = bt_field_class_real_create(ctx->ir_tc); - BT_ASSERT(ir_fc); - if (fc->base.size == 32) { - bt_field_class_real_set_is_single_precision(ir_fc, - BT_TRUE); + ir_fc = bt_field_class_real_single_precision_create(ctx->ir_tc); + } else { + ir_fc = bt_field_class_real_double_precision_create(ctx->ir_tc); } + BT_ASSERT(ir_fc); return ir_fc; } @@ -303,7 +302,7 @@ bt_field_class *ctf_field_class_variant_to_ir(struct ctx *ctx, bt_field_class_enumeration_signed_mapping_borrow_ranges_const( mapping); BT_ASSERT(range_set); - ret = bt_field_class_variant_with_selector_signed_append_option( + ret = bt_field_class_variant_with_selector_integer_signed_append_option( ir_fc, named_fc->name->str, option_ir_fc, range_set); } else { @@ -319,7 +318,7 @@ bt_field_class *ctf_field_class_variant_to_ir(struct ctx *ctx, bt_field_class_enumeration_unsigned_mapping_borrow_ranges_const( mapping); BT_ASSERT(range_set); - ret = bt_field_class_variant_with_selector_unsigned_append_option( + ret = bt_field_class_variant_with_selector_integer_unsigned_append_option( ir_fc, named_fc->name->str, option_ir_fc, range_set); }