summaryrefslogtreecommitdiff
path: root/test/example/c-api-kitchen-sink.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/example/c-api-kitchen-sink.c')
-rw-r--r--test/example/c-api-kitchen-sink.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/test/example/c-api-kitchen-sink.c b/test/example/c-api-kitchen-sink.c
index e5b614bec..66cf43290 100644
--- a/test/example/c-api-kitchen-sink.c
+++ b/test/example/c-api-kitchen-sink.c
@@ -2008,12 +2008,17 @@ void test_binaries() {
BinaryenModuleWriteText(module, buffer, 1024);
printf("module s-expr printed (in memory):\n%s\n", buffer);
- // writ the s-expr representation to a pointer which is managed by the
+ // write the s-expr representation to a pointer which is managed by the
// caller
char* text = BinaryenModuleAllocateAndWriteText(module);
printf("module s-expr printed (in memory, caller-owned):\n%s\n", text);
free(text);
+ // write StackIR
+ text = BinaryenModuleAllocateAndWriteStackIR(module);
+ printf("module s-expr printed (StackIR):\n%s\n", text);
+ free(text);
+
BinaryenModuleDispose(module);
}