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 | 83fe91797ace489c28ebc02be09c27f6e6168912 (patch) | |
tree | c0bca3122c55232cf99f7639f4b47f9690f4783e | |
parent | a92666decdf2fdb9d81f84ef9e2893116b74c103 (diff) |
Fix buggy error message problem
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11379 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | utils/TableGen/FileLexer.l | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/utils/TableGen/FileLexer.l b/utils/TableGen/FileLexer.l index a941c9fb06..ec22afdb1f 100644 --- a/utils/TableGen/FileLexer.l +++ b/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... |