[llvm-commits] CVS: llvm/lib/AsmParser/Lexer.l
Chris Lattner
lattner at cs.uiuc.edu
Fri Mar 19 17:35:01 PST 2004
Changes in directory llvm/lib/AsmParser:
Lexer.l updated: 1.46 -> 1.47
---
Log message:
Hrm, we were leaking ~1M of garbage that valgrind never told us about because
it was "reachable". Cute.
---
Diffs of the changes: (+8 -0)
Index: llvm/lib/AsmParser/Lexer.l
diff -u llvm/lib/AsmParser/Lexer.l:1.46 llvm/lib/AsmParser/Lexer.l:1.47
--- llvm/lib/AsmParser/Lexer.l:1.46 Thu Mar 11 23:51:36 2004
+++ llvm/lib/AsmParser/Lexer.l Fri Mar 19 17:34:33 2004
@@ -306,6 +306,14 @@
{FPConstant} { llvmAsmlval.FPVal = atof(yytext); return FPVAL; }
{HexFPConstant} { llvmAsmlval.FPVal = HexToFP(yytext); return FPVAL; }
+<<EOF>> {
+ /* Make sure to free the internal buffers for flex when we are
+ * done reading our input!
+ */
+ yy_delete_buffer(YY_CURRENT_BUFFER);
+ return EOF;
+ }
+
[ \t\n] { /* Ignore whitespace */ }
. { return yytext[0]; }
More information about the llvm-commits
mailing list