diff options
author | Chris Lattner <sabre@nondot.org> | 2004-03-19 23:34:33 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-03-19 23:34:33 +0000 |
commit | e1512592885b0286f28ff51ad462df46e1837a47 (patch) | |
tree | c0b8110915d9eaf90ff2adf27c472e3be2f93c5e /lib/AsmParser | |
parent | 6a39aa52f0ec262d7a90912caff00d5904bd1533 (diff) | |
download | external_llvm-e1512592885b0286f28ff51ad462df46e1837a47.zip external_llvm-e1512592885b0286f28ff51ad462df46e1837a47.tar.gz external_llvm-e1512592885b0286f28ff51ad462df46e1837a47.tar.bz2 |
Hrm, we were leaking ~1M of garbage that valgrind never told us about because
it was "reachable". Cute.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12515 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AsmParser')
-rw-r--r-- | lib/AsmParser/Lexer.l | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/AsmParser/Lexer.l b/lib/AsmParser/Lexer.l index c2db5a2..3203fe5 100644 --- a/lib/AsmParser/Lexer.l +++ b/lib/AsmParser/Lexer.l @@ -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]; } |