3 * File name: testprograms/indentify_types.c
4 * Purpose: Shows use of type identification
5 * Author: Christian Schaefer, Goetz Lindenmaier
9 * Copyright: (c) 1999-2003 Universität Karlsruhe
10 * Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE.
19 # include "type_identify.h"
23 int main(int argc, char **argv)
28 printf("\nCreating type information for IDENTIFY_TYPES ...\n");
34 firm_parameter_t params;
35 type_identify_if_t params2;
36 memset (¶ms, 0, sizeof(params));
37 params.size = sizeof(params);
38 params2.cmp = compare_names;
40 params.ti_if = ¶ms2;
44 i1 = new_id_from_str("type1");
45 i2 = new_id_from_str("type2");
47 t1 = new_type_class(i1);
52 t2 = new_type_class(i1);
55 t3 = new_type_class(i2);
59 printf(" t1: "); DDMT(t1);
60 printf(" t2: "); DDMT(t2);
61 printf(" t3: "); DDMT(t3);
64 printf("Done building the graph. Dumping it.\n");
67 printf("use xvcg to view this graph:\n");
68 printf("/ben/goetz/bin/xvcg GRAPHNAME\n\n");