Make tblgen error more useful. Patch by B. Scott Michel
authorChris Lattner <sabre@nondot.org>
Wed, 17 Jan 2007 07:45:12 +0000 (07:45 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 17 Jan 2007 07:45:12 +0000 (07:45 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33295 91177308-0d34-0410-b5e6-96231b3b80d8

utils/TableGen/DAGISelEmitter.cpp

index 08ac808833f29d931395009bebe59fd7caa378a3..fbd0a9660ba538a492d0e8df50a233aa0cb4be5f 100644 (file)
@@ -2621,7 +2621,10 @@ public:
         assert(N->getExtTypes().size() == 1 && "Multiple types not handled!");
         std::string CastType;
         switch (N->getTypeNum(0)) {
-        default: assert(0 && "Unknown type for constant node!");
+        default:
+          cerr << "Cannot handle " << getEnumName(N->getTypeNum(0))
+               << " type as an immediate constant. Aborting\n";
+          abort();
         case MVT::i1:  CastType = "bool"; break;
         case MVT::i8:  CastType = "unsigned char"; break;
         case MVT::i16: CastType = "unsigned short"; break;