summaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
diff options
context:
space:
mode:
authorChris Lattner <clattner@nondot.org>2021-05-18 10:23:01 -0700
committerChris Lattner <clattner@nondot.org>2021-05-18 10:51:52 -0700
commit855b42ddd0117055477546e9cc16667a62ffdedf (patch)
treef687b7c6dd1ee69c5c19a023794224da6d314b9d /llvm/lib/Bitcode/Reader/BitcodeReader.cpp
parent5781f9a7434267bf15a94f4210d3abca3bf773e2 (diff)
[IntegerAttr] Add helpers for working with LLVM's APSInt type.
The FIRRTL dialect in CIRCT uses inherently signful types, and APSInt is the best way to model that. Add a couple of helpers that make it easier to work with an IntegerAttr that carries a sign. This follows the example of getZExt() and getSExt() which assert when the underlying type of the attribute is unexpected. In this case we assert fail when the underlying type of the attribute is signless. This is strictly additive, so it is NFC. It is tested in the CIRCT repo. Differential Revision: https://reviews.llvm.org/D102701
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
0 files changed, 0 insertions, 0 deletions