Add missing 'return on failure'. Previously we'd crash after emitting
authorJim Grosbach <grosbach@apple.com>
Fri, 11 Mar 2011 19:52:52 +0000 (19:52 +0000)
committerJim Grosbach <grosbach@apple.com>
Fri, 11 Mar 2011 19:52:52 +0000 (19:52 +0000)
the diagnostic.

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

utils/TableGen/TGParser.cpp

index f6041be95e16e5f7ec1500583a300c15a4968a1b..59097f986f79b573e883845d3d29689f2cd25586 100644 (file)
@@ -1153,6 +1153,7 @@ Init *TGParser::ParseSimpleValue(Record *CurRec, RecTy *ItemType) {
         s << "Type mismatch for list, expected list type, got "
           << ItemType->getAsString();
         TokError(s.str());
+        return 0;
       }
       GivenListTy = ListType;
     }