Modified the code so that we exit() with a non-zero value instead of calling
authorJohn Criswell <criswell@uiuc.edu>
Tue, 9 Sep 2003 14:37:48 +0000 (14:37 +0000)
committerJohn Criswell <criswell@uiuc.edu>
Tue, 9 Sep 2003 14:37:48 +0000 (14:37 +0000)
abort() when we can't open the input filename.  The abort() function generates
a core dump if possible and is meant for handling errors so grand that even the
program knows that debugging is necessary.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8415 91177308-0d34-0410-b5e6-96231b3b80d8

support/tools/TableGen/FileLexer.l
utils/TableGen/FileLexer.l

index 52f46b5239ab6710eba8bc8f318c26ed5417b0d3..64ed4c625a97022e5fd5865a3d6db0929de37110 100644 (file)
@@ -82,7 +82,7 @@ void ParseFile(const std::string &Filename, const std::string & IncludeDir) {
 
     if (F == 0) {
       std::cerr << "Could not open input file '" + Filename + "'!\n";
-      abort();
+      exit (1);
     }
     IncludeStack.push_back(IncludeRec(Filename, F));
   } else {
index 52f46b5239ab6710eba8bc8f318c26ed5417b0d3..64ed4c625a97022e5fd5865a3d6db0929de37110 100644 (file)
@@ -82,7 +82,7 @@ void ParseFile(const std::string &Filename, const std::string & IncludeDir) {
 
     if (F == 0) {
       std::cerr << "Could not open input file '" + Filename + "'!\n";
-      abort();
+      exit (1);
     }
     IncludeStack.push_back(IncludeRec(Filename, F));
   } else {