[IR Parser] Fix a crash handling zero width integer attributes.
authorChris Lattner <clattner@nondot.org>
Mon, 11 Jan 2021 02:32:57 +0000 (18:32 -0800)
committerChris Lattner <clattner@nondot.org>
Mon, 11 Jan 2021 05:18:01 +0000 (21:18 -0800)
commitdcac2da10632c83737fce6da60fbc4dd09c01034
tree3774cfaafce04dc12ffd5e56063cfbfd68d5c167
parentffa67873a3f93a6baa0046221edd08a90b0db6f8
[IR Parser] Fix a crash handling zero width integer attributes.

llvm::APInt cannot hold zero bit values, therefore we shouldn't try
to form them.

Differential Revision: https://reviews.llvm.org/D94384
mlir/lib/Parser/AttributeParser.cpp
mlir/test/IR/invalid-ops.mlir