+ var_ft = bt_field_borrow_type(variant);
+ tag_ft = bt_field_type_variant_borrow_tag_field_type(
+ var_ft);
+ container_ft =
+ bt_field_type_enumeration_borrow_container_field_type(
+ tag_ft);
+ is_signed = bt_field_type_integer_is_signed(container_ft);
+
+ if (is_signed) {
+ int64_t tag;
+
+ iret = bt_field_variant_get_tag_signed(variant, &tag);
+ if (iret) {
+ ret = BT_COMPONENT_STATUS_ERROR;
+ goto end;
+ }
+
+ iter = bt_field_type_enumeration_signed_find_mappings_by_value(
+ tag_ft, tag);
+ } else {
+ uint64_t tag;
+
+ iret = bt_field_variant_get_tag_unsigned(variant, &tag);
+ if (iret) {
+ ret = BT_COMPONENT_STATUS_ERROR;
+ goto end;
+ }
+
+ iter = bt_field_type_enumeration_unsigned_find_mappings_by_value(
+ tag_ft, tag);
+ }
+
+ if (!iter) {