From: Götz Lindenmaier Date: Tue, 8 Jun 2004 16:37:27 +0000 (+0000) Subject: firmjni error: extern "C" in firm.h X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=1a09f25603172665322612b51760898e54d13530;p=libfirm firmjni error: extern "C" in firm.h new subdir and file firmjnit refrence: more debug callbacks [r3039] --- diff --git a/firmjni/Makefile.in b/firmjni/Makefile.in index fafb7f51f..09508aee3 100644 --- a/firmjni/Makefile.in +++ b/firmjni/Makefile.in @@ -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)) diff --git a/firmjni/testprograms/run-results.txt b/firmjni/testprograms/run-results.txt index 788213b89..346ee03be 100644 --- a/firmjni/testprograms/run-results.txt +++ b/firmjni/testprograms/run-results.txt @@ -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, diff --git a/tools/remove_cpp_comands.perl b/tools/remove_cpp_comands.perl index 9f0703c6c..56a8c2a24 100644 --- a/tools/remove_cpp_comands.perl +++ b/tools/remove_cpp_comands.perl @@ -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;