Hrm, we were leaking ~1M of garbage that valgrind never told us about because
authorChris Lattner <sabre@nondot.org>
Fri, 19 Mar 2004 23:34:33 +0000 (23:34 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 19 Mar 2004 23:34:33 +0000 (23:34 +0000)
it was "reachable".  Cute.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12515 91177308-0d34-0410-b5e6-96231b3b80d8

lib/AsmParser/Lexer.l

index c2db5a26348fe0c7239fa54ec9f0f9a3574382ad..3203fe5b5181cc686eea157d7d9298ccec78c1cb 100644 (file)
@@ -306,6 +306,14 @@ getelementptr   { RET_TOK(MemOpVal, GetElementPtr, GETELEMENTPTR); }
 {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]; }