[llvm-commits] CVS: llvm-test/MultiSource/Applications/d/Makefile write_ctables.c
Chris Lattner
lattner at cs.uiuc.edu
Thu Oct 20 23:39:07 PDT 2005
Changes in directory llvm-test/MultiSource/Applications/d:
Makefile updated: 1.5 -> 1.6
write_ctables.c updated: 1.1 -> 1.2
---
Log message:
Restore the file generated from the grammar. Instead fix the program to
write its output to stdout instead of to a file that clobbers one of its
source files.
---
Diffs of the changes: (+5 -5)
Makefile | 2 +-
write_ctables.c | 8 ++++----
2 files changed, 5 insertions(+), 5 deletions(-)
Index: llvm-test/MultiSource/Applications/d/Makefile
diff -u llvm-test/MultiSource/Applications/d/Makefile:1.5 llvm-test/MultiSource/Applications/d/Makefile:1.6
--- llvm-test/MultiSource/Applications/d/Makefile:1.5 Fri Oct 21 01:27:53 2005
+++ llvm-test/MultiSource/Applications/d/Makefile Fri Oct 21 01:38:55 2005
@@ -1,6 +1,6 @@
LEVEL = ../../..
PROG = make_dparser
-Source=make_dparser.c write_ctables.c gram.c lex.c lr.c arg.c parse.c scan.c symtab.c util.c
+Source=make_dparser.c write_ctables.c gram.c lex.c lr.c arg.c parse.c scan.c symtab.c util.c version.c grammar.g.c
CPPFLAGS = -DD_BUILD_VERSION=5725
RUN_OPTIONS="-v $(PROJ_SRC_DIR)/grammar.g"
include ../../Makefile.multisrc
Index: llvm-test/MultiSource/Applications/d/write_ctables.c
diff -u llvm-test/MultiSource/Applications/d/write_ctables.c:1.1 llvm-test/MultiSource/Applications/d/write_ctables.c:1.2
--- llvm-test/MultiSource/Applications/d/write_ctables.c:1.1 Thu Jan 1 10:50:36 2004
+++ llvm-test/MultiSource/Applications/d/write_ctables.c Fri Oct 21 01:38:55 2005
@@ -958,7 +958,7 @@
if (g->write_header > 0 || (g->write_header < 0 && (tokens || states))) {
strcpy(pathname, base_pathname);
strcat(pathname, ".d_parser.h");
- hfp = fopen(pathname, "w");
+ hfp = stdout; //fopen(pathname, "w");
if (!hfp)
d_fail("unable to open `%s` for write\n", pathname);
fprintf(hfp, "#ifndef _%s_h\n", tag);
@@ -993,7 +993,7 @@
g->productions.v[i]->name, g->productions.v[i]->state->index);
}
fprintf(hfp, "#endif\n");
- fclose(hfp);
+ //fclose(hfp);
return 1;
}
return 0;
@@ -1049,7 +1049,7 @@
strcpy(pathname, base_pathname);
strcat(pathname, ".d_parser.c");
- fp = fopen(pathname, "w");
+ fp = stdout; //fopen(pathname, "w");
if (!fp)
d_fail("unable to open `%s` for write\n", pathname);
@@ -1094,7 +1094,7 @@
else
fprintf(fp, "0");
fprintf(fp, "};\n");
- fclose(fp);
+ //fclose(fp);
}
int
More information about the llvm-commits
mailing list