EnumsGen: remove dangling assertion
authorLei Zhang <antiagainst@google.com>
Tue, 2 Jul 2019 03:56:13 +0000 (20:56 -0700)
committerjpienaar <jpienaar@google.com>
Tue, 2 Jul 2019 17:27:49 +0000 (10:27 -0700)
StringAttr-backed enum attribute cases changed to allow explicit values,
But this assertion was not deleted.

Fixes https://github.com/tensorflow/mlir/issues/39

PiperOrigin-RevId: 256090793

mlir/lib/TableGen/Attribute.cpp

index d292f2bdac62a46af37f27ec0e84c8346c564cc8..c7dc002beeff35b189953d65f102221f4837d07a 100644 (file)
@@ -149,7 +149,6 @@ StringRef tblgen::EnumAttrCase::getSymbol() const {
 }
 
 int64_t tblgen::EnumAttrCase::getValue() const {
-  assert(isStrCase() && "cannot get value for EnumAttrCase");
   return def->getValueAsInt("value");
 }