[llvm-commits] CVS: llvm/Makefile.common
Chris Lattner
lattner at cs.uiuc.edu
Thu Jan 23 10:34:01 PST 2003
Changes in directory llvm:
Makefile.common updated: 1.74 -> 1.75
---
Log message:
Fix problem with flex scanners and huge token sizes
---
Diffs of the changes:
Index: llvm/Makefile.common
diff -u llvm/Makefile.common:1.74 llvm/Makefile.common:1.75
--- llvm/Makefile.common:1.74 Wed Jan 22 10:13:31 2003
+++ llvm/Makefile.common Thu Jan 23 10:33:10 2003
@@ -467,8 +467,17 @@
# Create a .cpp source file from a flex input file... this uses sed to cut down
# on the warnings emited by GCC...
+#
+# The last line is a gross hack to work around flex aparently not being able to
+# resize the buffer on a large token input. Currently, for uninitialized string
+# buffers in LLVM we can generate very long tokens, so this is a hack around it.
+# FIXME. (f.e. char Buffer[10000]; )
+#
%.cpp: %.l
- flex -t $< | sed '/^find_rule/d' | sed 's/void yyunput/inline void yyunput/' | sed 's/void \*yy_flex_realloc/inline void *yy_flex_realloc/' > $@
+ flex -t $< | sed '/^find_rule/d' | \
+ sed 's/void yyunput/inline void yyunput/' | \
+ sed 's/void \*yy_flex_realloc/inline void *yy_flex_realloc/' | \
+ sed 's/#define YY_BUF_SIZE 16384/#define YY_BUF_SIZE (16384*64)/' > $@
# Rule for building the bison parsers...
More information about the llvm-commits
mailing list