summaryrefslogtreecommitdiff
path: root/src/driver
diff options
context:
space:
mode:
Diffstat (limited to 'src/driver')
-rw-r--r--src/driver/amgc_driver_ctx.c10
-rw-r--r--src/driver/amgc_unit_action.c6
2 files changed, 16 insertions, 0 deletions
diff --git a/src/driver/amgc_driver_ctx.c b/src/driver/amgc_driver_ctx.c
index 4489109..ffe319d 100644
--- a/src/driver/amgc_driver_ctx.c
+++ b/src/driver/amgc_driver_ctx.c
@@ -209,6 +209,16 @@ int amgc_get_driver_ctx(
if (!strcmp("primary",entry->arg))
ctx->actions[nactions++].subset = TYPE_ATOMIC;
break;
+
+ case TAG_PRINT_STRUCTS:
+ ctx->actions[nactions].type = AMGC_ACTION_OUTPUT;
+ ctx->actions[nactions++].action = AMGC_OUTPUT_STRUCT;
+ break;
+
+ case TAG_PRINT_UNIONS:
+ ctx->actions[nactions].type = AMGC_ACTION_OUTPUT;
+ ctx->actions[nactions++].action = AMGC_OUTPUT_UNION;
+ break;
}
ctx->ctx.program = program;
diff --git a/src/driver/amgc_unit_action.c b/src/driver/amgc_unit_action.c
index b1d018a..29bc446 100644
--- a/src/driver/amgc_unit_action.c
+++ b/src/driver/amgc_unit_action.c
@@ -33,6 +33,12 @@ int amgc_perform_unit_action(
return amgc_output_unit_entities(
uctx,ENTITY_TYPEDEF,action->subset,
layout,fout);
+
+ case AMGC_OUTPUT_STRUCT:
+ return amgc_output_unit_structs(uctx,layout,fout);
+
+ case AMGC_OUTPUT_UNION:
+ return amgc_output_unit_unions(uctx,layout,fout);
}
return -1;