Check prototypes for struct/union/enum types testcase.
authorJustin Seyster <jseyster@cs.sunysb.edu>
Tue, 7 Sep 2010 22:25:21 +0000 (18:25 -0400)
committerJustin Seyster <jseyster@cs.sunysb.edu>
Tue, 7 Sep 2010 22:25:21 +0000 (18:25 -0400)
test/plugin-struct-types.c
test/struct-types.xml

index 870ef687273af6b182d7076789d76c3adaeb000d..a4f808ffdb2c74a6f737bf14426a75f5b6da482c 100644 (file)
@@ -42,6 +42,19 @@ static unsigned int plugin_struct()
   return 0;
 }
 
+void aop_finish()
+{
+  const char *header;
+  header = aop_get_arg_value("header");
+
+  if (header != NULL) {
+    int res;
+    res = aop_write_c_header(header, "_INT_HEADER_", NULL, NULL);
+    if (res != 0)
+      perror(header);
+  }
+}
+
 AOP_MAIN_PROTO aop_main()
 {
   aop_register_pass("struct", plugin_struct);
index 5d53994d161cc0fedc3c887799646f071a22e316..549f287add82825ce6939feebffc76f728c77bb2 100644 (file)
       union * advice (union_func_ptr): -1717986918, 1.100000 -- -1717986918, 1.100000
       union: -1717986918, 1.100000
     </output>
+    <prototypes>
+      void _advice_enum(signed char *, enum baz, enum baz);
+      void _advice_struct(signed char *, struct foo, struct foo);
+      void _advice_struct_ptr(signed char *, struct foo *, struct foo *);
+      void _advice_union(signed char *, union bar, union bar);
+      void _advice_union_ptr(signed char *, union bar *, union bar *);
+    </prototypes>
   </run>
 </testcase>