diff options
author | Chris Lattner <sabre@nondot.org> | 2004-02-13 16:33:56 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-02-13 16:33:56 +0000 |
commit | a80e9f0a197d0695d2d72d0c8ca7b9bfdcffc57c (patch) | |
tree | d2c487c482319c0ab2eddf7f222f08c3e954cb6f | |
parent | 29cb68f761fff8564ca1f834bde38253201fda10 (diff) | |
download | llvm-a80e9f0a197d0695d2d72d0c8ca7b9bfdcffc57c.zip llvm-a80e9f0a197d0695d2d72d0c8ca7b9bfdcffc57c.tar.gz llvm-a80e9f0a197d0695d2d72d0c8ca7b9bfdcffc57c.tar.bz2 |
Fix buggy error message problem
llvm-svn: 11379
-rw-r--r-- | llvm/utils/TableGen/FileLexer.l | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/utils/TableGen/FileLexer.l b/llvm/utils/TableGen/FileLexer.l index a941c9f..ec22afd 100644 --- a/llvm/utils/TableGen/FileLexer.l +++ b/llvm/utils/TableGen/FileLexer.l @@ -126,12 +126,13 @@ static void HandleInclude(const char *Buffer) { // // NOTE: Right now, there is only one directory. We need to eventually add // support for more. - Filename = IncludeDirectory + "/" + Filename; - yyin = fopen(Filename.c_str(), "r"); + std::string NextFilename = IncludeDirectory + "/" + Filename; + yyin = fopen(NextFilename.c_str(), "r"); if (yyin == 0) { err() << "Could not find include file '" << Filename << "'!\n"; abort(); } + Filename = NextFilename; } // Add the file to our include stack... |