[llvm-commits] CVS: llvm/utils/TableGen/FileLexer.l

Chris Lattner lattner at cs.uiuc.edu
Fri Feb 13 10:35:02 PST 2004


Changes in directory llvm/utils/TableGen:

FileLexer.l updated: 1.19 -> 1.20

---
Log message:

Fix buggy error message problem


---
Diffs of the changes:  (+3 -2)

Index: llvm/utils/TableGen/FileLexer.l
diff -u llvm/utils/TableGen/FileLexer.l:1.19 llvm/utils/TableGen/FileLexer.l:1.20
--- llvm/utils/TableGen/FileLexer.l:1.19	Wed Feb 11 18:03:08 2004
+++ llvm/utils/TableGen/FileLexer.l	Fri Feb 13 10:33:56 2004
@@ -126,12 +126,13 @@
     //
     // 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...





More information about the llvm-commits mailing list