firmjni error: extern "C" in firm.h
authorGötz Lindenmaier <goetz@ipd.info.uni-karlsruhe.de>
Tue, 8 Jun 2004 16:37:27 +0000 (16:37 +0000)
committerGötz Lindenmaier <goetz@ipd.info.uni-karlsruhe.de>
Tue, 8 Jun 2004 16:37:27 +0000 (16:37 +0000)
new subdir and file
firmjnit refrence: more debug callbacks

[r3039]

firmjni/Makefile.in
firmjni/testprograms/run-results.txt
tools/remove_cpp_comands.perl

index fafb7f5..09508ae 100644 (file)
@@ -46,7 +46,7 @@ CLASSFILES = $(MEMBERS:.m=.class)
 CPPFLAGS +=    -I$(top_srcdir)/ir/ir  -I$(top_srcdir)/ir/common        \
                -I$(top_srcdir)/ir/ident -I$(top_srcdir)/ir/tr          \
                -I$(top_srcdir)/ir/tv -I$(top_srcdir)/ir/debug          \
-               -I$(top_srcdir)/ir/ana -I$(top_stcdir)/ir/opt           \
+               -I$(top_srcdir)/ir/ana -I$(top_srcdir)/ir/opt           \
                -I$(top_srcdir)/ir/st
 
 LDFLAGS += -I$(topdir)
@@ -68,7 +68,7 @@ FIRM_PATH_HEADERS=common/firm.h common/firm_common.h \
        ir/ircons.h ir/ircgcons.h ir/irflag.h ir/irvrfy.h ir/irdump.h \
        ir/iropt.h ir/irgopt.h ir/ircgopt.h \
        ana/irouts.h ana/irdom.h ana/irloop.h ana/cgana.h \
-       ir/irgmod.h tr/typegmod.h
+       ir/irgmod.h tr/typegmod.h opt/tailrec.h
 
 FIRM_SOURCE_DIR_HEADERS=$(addprefix $(SOURCE_DIR)/,$(FIRM_HEADERS))
 
index 788213b..346ee03 100644 (file)
@@ -6,6 +6,9 @@ use xvcg to view this graph:
 
 
 Creating an IR graph: IfElseExample...
+Optimization: 3
+new Node 33
+old Node 32
 Optimization: 2
 new Nodes: 35,
 old Nodes: 36, 34, 35,
index 9f0703c..56a8c2a 100644 (file)
@@ -61,9 +61,17 @@ $guardedtypedef = 0;
 $scndlastline = "";
 $lastline = "";
 
+$eat = 0;
+
 foreach $line (@lines) {
 
-    if (($line =~ /^\#/)   ) {
+    if ($line =~ /\#ifdef __cplusplus/) {
+#       There is extern "C" in firm.h, guarded by #ifdef __cplusplus
+#       crecoder does not grok the extern "C", so remove thses three lines.
+       $eat = 2;
+    } elsif ($eat > 0) {
+       $eat = $eat -1;
+    } elsif (($line =~ /^\#/)   ) {
        # eat the line
        $scndlastline = $lastline;
        $lastline = $line;
@@ -99,8 +107,6 @@ foreach $line (@lines) {
                $guardedtypedef = 0;
            }
        }
-    } elsif ($line =~ /extern "C"/) {
-       print OUT "/* extern C */ {";
     } else {
        print OUT "$line";
        $scndlastline = $lastline;