exit(1) instead of abort()'ing on error

llvm-svn: 11380
diff --git a/llvm/utils/TableGen/FileParser.y b/llvm/utils/TableGen/FileParser.y
index e95e597..af8d3d4 100644
--- a/llvm/utils/TableGen/FileParser.y
+++ b/llvm/utils/TableGen/FileParser.y
@@ -51,7 +51,7 @@
       err() << "New definition of '" << RV.getName() << "' of type '"
             << *RV.getType() << "' is incompatible with previous "
             << "definition of type '" << *ERV->getType() << "'!\n";
-      abort();
+      exit(1);
     }
   } else {
     CurRec->addValue(RV);
@@ -61,7 +61,7 @@
 static void addSuperClass(Record *SC) {
   if (CurRec->isSubClassOf(SC)) {
     err() << "Already subclass of '" << SC->getName() << "'!\n";
-    abort();
+    exit(1);
   }
   CurRec->addSuperClass(SC);
 }
@@ -73,7 +73,7 @@
   RecordVal *RV = CurRec->getValue(ValName);
   if (RV == 0) {
     err() << "Value '" << ValName << "' unknown!\n";
-    abort();
+    exit(1);
   }
   
   // If we are assigning to a subset of the bits in the value... then we must be
@@ -84,7 +84,7 @@
     BitsInit *CurVal = dynamic_cast<BitsInit*>(RV->getValue());
     if (CurVal == 0) {
       err() << "Value '" << ValName << "' is not a bits type!\n";
-      abort();
+      exit(1);
     }
 
     // Convert the incoming value to a bits type of the appropriate size...
@@ -92,7 +92,7 @@
     if (BI == 0) {
       V->convertInitializerTo(new BitsRecTy(BitList->size()));
       err() << "Initializer '" << *V << "' not compatible with bit range!\n";
-      abort();
+      exit(1);
     }
 
     // We should have a BitsInit type now...
@@ -107,7 +107,7 @@
       if (NewVal->getBit(Bit)) {
         err() << "Cannot set bit #" << Bit << " of value '" << ValName
               << "' more than once!\n";
-        abort();
+        exit(1);
       }
       NewVal->setBit(Bit, BInit->getBit(i));
     }
@@ -122,7 +122,7 @@
   if (RV->setValue(V)) {
     err() << "Value '" << ValName << "' of type '" << *RV->getType()
 	  << "' is incompatible with initializer '" << *V << "'!\n";
-    abort();
+    exit(1);
   }
 }
 
@@ -137,7 +137,7 @@
   // Ensure that an appropriate number of template arguments are specified...
   if (TArgs.size() < TemplateArgs.size()) {
     err() << "ERROR: More template args specified than expected!\n";
-    abort();
+    exit(1);
   } else {    // This class expects template arguments...
     // Loop over all of the template arguments, setting them to the specified
     // value or leaving them as the default as necessary.
@@ -149,7 +149,7 @@
 	err() << "ERROR: Value not specified for template argument #"
 	      << i << " (" << TArgs[i] << ") of subclass '" << SC->getName()
 	      << "'!\n";
-	abort();
+	exit(1);
       }
     }
   }
@@ -206,7 +206,7 @@
     $$ = Records.getClass(*$1);
     if ($$ == 0) {
       err() << "Couldn't find class '" << *$1 << "'!\n";
-      abort();
+      exit(1);
     }
     delete $1;
   };
@@ -252,7 +252,7 @@
       if (Bit == 0) {
 	err() << "Element #" << i << " (" << *(*$2)[i]
 	      << ") is not convertable to a bit!\n";
-	abort();
+	exit(1);
       }
       Init->setBit($2->size()-i-1, Bit);
     }
@@ -265,7 +265,7 @@
       $$ = new DefInit(D);
     } else {
       err() << "Variable not defined: '" << *$1 << "'!\n";
-      abort();
+      exit(1);
     }
     
     delete $1;
@@ -273,7 +273,7 @@
     $$ = $1->convertInitializerBitRange(*$3);
     if ($$ == 0) {
       err() << "Invalid bit range for value '" << *$1 << "'!\n";
-      abort();
+      exit(1);
     }
     delete $3;
   } | '[' ValueList ']' {
@@ -282,7 +282,7 @@
   } | Value '.' ID {
     if (!$1->getFieldType(*$3)) {
       err() << "Cannot access field '" << *$3 << "' of value '" << *$1 << "!\n";
-      abort();
+      exit(1);
     }
     $$ = new FieldInit($1, *$3);
     delete $3;
@@ -290,7 +290,7 @@
     Record *D = Records.getDef(*$2);
     if (D == 0) {
       err() << "Invalid def '" << *$2 << "'!\n";
-      abort();
+      exit(1);
     }
     $$ = new DagInit(D, *$3);
     delete $2; delete $3;
@@ -326,7 +326,7 @@
   } | INTVAL '-' INTVAL {
     if ($1 < $3 || $1 < 0 || $3 < 0) {
       err() << "Invalid bit range: " << $1 << "-" << $3 << "!\n";
-      abort();
+      exit(1);
     }
     $$ = new std::vector<unsigned>();
     for (int i = $1; i >= $3; --i)
@@ -335,7 +335,7 @@
     $2 = -$2;
     if ($1 < $2 || $1 < 0 || $2 < 0) {
       err() << "Invalid bit range: " << $1 << "-" << $2 << "!\n";
-      abort();
+      exit(1);
     }
     $$ = new std::vector<unsigned>();
     for (int i = $1; i >= $2; --i)
@@ -345,7 +345,7 @@
   } | RBitList ',' INTVAL '-' INTVAL {
     if ($3 < $5 || $3 < 0 || $5 < 0) {
       err() << "Invalid bit range: " << $3 << "-" << $5 << "!\n";
-      abort();
+      exit(1);
     }
     $$ = $1;
     for (int i = $3; i >= $5; --i)
@@ -354,7 +354,7 @@
     $4 = -$4;
     if ($3 < $4 || $3 < 0 || $4 < 0) {
       err() << "Invalid bit range: " << $3 << "-" << $4 << "!\n";
-      abort();
+      exit(1);
     }
     $$ = $1;
     for (int i = $3; i >= $4; --i)
@@ -472,7 +472,7 @@
 ClassInst : CLASS ObjectBody {
   if (Records.getClass($2->getName())) {
     err() << "Class '" << $2->getName() << "' already defined!\n";
-    abort();
+    exit(1);
   }
   Records.addClass($$ = $2);
 };
@@ -481,12 +481,12 @@
   if (!$2->getTemplateArgs().empty()) {
     err() << "Def '" << $2->getName()
           << "' is not permitted to have template arguments!\n";
-    abort();
+    exit(1);
   }
   // If ObjectBody has template arguments, it's an error.
   if (Records.getDef($2->getName())) {
     err() << "Def '" << $2->getName() << "' already defined!\n";
-    abort();
+    exit(1);
   }
   Records.addDef($$ = $2);
 };
@@ -520,5 +520,5 @@
 
 int yyerror(const char *ErrorMsg) {
   err() << "Error parsing: " << ErrorMsg << "\n";
-  abort();
+  exit(1);
 }