Fix bug: Assembler/2004-03-30-UnclosedFunctionCrash.llx

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12551 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2004-03-30 20:58:25 +00:00
parent 982b2791cf
commit bc280abd46

View File

@ -1992,7 +1992,7 @@ int yyerror(const char *ErrorMsg) {
= std::string((CurFilename == "-") ? std::string("<stdin>") : CurFilename)
+ ":" + utostr((unsigned) llvmAsmlineno) + ": ";
std::string errMsg = std::string(ErrorMsg) + "\n" + where + " while reading ";
if (yychar == YYEMPTY)
if (yychar == YYEMPTY || yychar == 0)
errMsg += "end-of-file.";
else
errMsg += "token: '" + std::string(llvmAsmtext, llvmAsmleng) + "'";