*/
#define BT_LOG_TAG "LIB/RESOLVE-FIELD-PATH"
-#include "lib/lib-logging.h"
+#include "lib/logging.h"
#include "lib/assert-pre.h"
#include "common/assert.h"
return field_path;
}
-BT_ASSERT_PRE_FUNC
+BT_ASSERT_PRE_DEV_FUNC
static inline
bool target_is_before_source(struct bt_field_path *src_field_path,
struct bt_field_path *tgt_field_path)
return is_valid;
}
-BT_ASSERT_PRE_FUNC
+BT_ASSERT_PRE_DEV_FUNC
static inline
struct bt_field_class *borrow_root_field_class(
struct bt_resolve_field_path_context *ctx, enum bt_scope scope)
return NULL;
}
-BT_ASSERT_PRE_FUNC
+BT_ASSERT_PRE_DEV_FUNC
static inline
struct bt_field_class *borrow_child_field_class(
struct bt_field_class *parent_fc,
return child_fc;
}
-BT_ASSERT_PRE_FUNC
+BT_ASSERT_PRE_DEV_FUNC
static inline
bool target_field_path_in_different_scope_has_struct_fc_only(
struct bt_field_path *src_field_path,
return is_valid;
}
-BT_ASSERT_PRE_FUNC
+BT_ASSERT_PRE_DEV_FUNC
static inline
bool lca_is_structure_field_class(struct bt_field_path *src_field_path,
struct bt_field_path *tgt_field_path,
return is_valid;
}
-BT_ASSERT_PRE_FUNC
+BT_ASSERT_PRE_DEV_FUNC
static inline
bool lca_to_target_has_struct_fc_only(struct bt_field_path *src_field_path,
struct bt_field_path *tgt_field_path,
return is_valid;
}
-BT_ASSERT_PRE_FUNC
+BT_ASSERT_PRE_DEV_FUNC
static inline
bool field_path_is_valid(struct bt_field_class *src_fc,
struct bt_field_class *tgt_fc,
tgt_fc, ctx);
if (!src_field_path) {
- BT_ASSERT_PRE_MSG("Cannot find requesting field class in "
+ BT_ASSERT_PRE_DEV_MSG("Cannot find requesting field class in "
"resolving context: %!+F", src_fc);
is_valid = false;
goto end;
}
if (!tgt_field_path) {
- BT_ASSERT_PRE_MSG("Cannot find target field class in "
+ BT_ASSERT_PRE_DEV_MSG("Cannot find target field class in "
"resolving context: %!+F", tgt_fc);
is_valid = false;
goto end;
/* Target must be before source */
if (!target_is_before_source(src_field_path, tgt_field_path)) {
- BT_ASSERT_PRE_MSG("Target field class is located after "
+ BT_ASSERT_PRE_DEV_MSG("Target field class is located after "
"requesting field class: %![req-fc-]+F, %![tgt-fc-]+F",
src_fc, tgt_fc);
is_valid = false;
*/
if (!target_field_path_in_different_scope_has_struct_fc_only(
src_field_path, tgt_field_path, ctx)) {
- BT_ASSERT_PRE_MSG("Target field class is located in a "
+ BT_ASSERT_PRE_DEV_MSG("Target field class is located in a "
"different scope than requesting field class, "
"but within an array or a variant field class: "
"%![req-fc-]+F, %![tgt-fc-]+F",
/* Same scope: LCA must be a structure field class */
if (!lca_is_structure_field_class(src_field_path, tgt_field_path, ctx)) {
- BT_ASSERT_PRE_MSG("Lowest common ancestor of target and "
+ BT_ASSERT_PRE_DEV_MSG("Lowest common ancestor of target and "
"requesting field classes is not a structure field class: "
"%![req-fc-]+F, %![tgt-fc-]+F",
src_fc, tgt_fc);
/* Same scope: path from LCA to target has no array/variant FTs */
if (!lca_to_target_has_struct_fc_only(src_field_path, tgt_field_path,
ctx)) {
- BT_ASSERT_PRE_MSG("Path from lowest common ancestor of target "
+ BT_ASSERT_PRE_DEV_MSG("Path from lowest common ancestor of target "
"and requesting field classes to target field class "
"contains an array or a variant field class: "
"%![req-fc-]+F, %![tgt-fc-]+F", src_fc, tgt_fc);
struct bt_field_class *tgt_fc,
struct bt_resolve_field_path_context *ctx)
{
- BT_ASSERT_PRE(field_path_is_valid(src_fc, tgt_fc, ctx),
+ BT_ASSERT_PRE_DEV(field_path_is_valid(src_fc, tgt_fc, ctx),
"Invalid target field class: %![req-fc-]+F, %![tgt-fc-]+F",
src_fc, tgt_fc);
return find_field_class_in_ctx(tgt_fc, ctx);