projects
/
libfirm
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
- shorten the lifetime of a variable
[libfirm]
/
testprograms
/
identify_types.c
diff --git
a/testprograms/identify_types.c
b/testprograms/identify_types.c
index
48f12e7
..
a83c0c2
100644
(file)
--- a/
testprograms/identify_types.c
+++ b/
testprograms/identify_types.c
@@
-1,7
+1,7
@@
/*
* Project: libFIRM
* File name: testprograms/indentify_types.c
/*
* Project: libFIRM
* File name: testprograms/indentify_types.c
- * Purpose: Shows use of type identification
+ * Purpose: Shows use of
ir_
type identification
* Author: Christian Schaefer, Goetz Lindenmaier
* Modified by:
* Created:
* Author: Christian Schaefer, Goetz Lindenmaier
* Modified by:
* Created:
@@
-10,31
+10,26
@@
* Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE.
*/
* Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE.
*/
-#
include <stdio.h>
-#
include <string.h>
+#include <stdio.h>
+#include <string.h>
-# include "irvrfy.h"
-# include "irdump.h"
-# include "firm.h"
-# include "type_identify.h"
+#include <libfirm/firm.h>
-
-
-int main(int argc, char **argv)
+int main(void)
{
ident *i1, *i2;
{
ident *i1, *i2;
- type *t1, *t2, *t3;
-
- printf("\nCreating type information for IDENTIFY_TYPES ...\n");
-
-
+ ir_type *t1, *t2, *t3;
+ firm_parameter_t params;
+ type_identify_if_t params2;
+ printf("\nCreating ir_type information for IDENTIFY_TYPES ...\n");
/** init library */
/** init library */
- firm_parameter_t params;
memset (¶ms, 0, sizeof(params));
params.size = sizeof(params);
memset (¶ms, 0, sizeof(params));
params.size = sizeof(params);
- params.compare_types_func = compare_names;
+ params2.cmp = compare_names;
+ params2.hash = NULL;
+ params.ti_if = ¶ms2;
init_firm(¶ms);
init_firm(¶ms);
@@
-59,10
+54,10
@@
int main(int argc, char **argv)
*/
printf("Done building the graph. Dumping it.\n");
*/
printf("Done building the graph. Dumping it.\n");
- dump_all_types();
+ dump_all_types(
0
);
- printf("
use xvcg
to view this graph:\n");
- printf("
/ben/goetz/bin/xvcg
GRAPHNAME\n\n");
+ printf("
Use ycomp
to view this graph:\n");
+ printf("
ycomp
GRAPHNAME\n\n");
return (0);
}
return (0);
}