diff options
author | Lioncash <[email protected]> | 2021-07-27 08:28:59 -0400 |
---|---|---|
committer | Rodrigo Locatti <[email protected]> | 2021-07-27 22:11:21 -0300 |
commit | 8cfe8badf70a7da0fa41e7f236bd6c5e52fa41ff (patch) | |
tree | 583fd0cc91e2575e40f3563b16180620c323be1f /include | |
parent | a39596358a3a5488c06554c0c15184a6af71e433 (diff) | |
download | sirit-8cfe8badf70a7da0fa41e7f236bd6c5e52fa41ff.tar.gz sirit-8cfe8badf70a7da0fa41e7f236bd6c5e52fa41ff.zip |
sirit: Add TypeSInt/TypeUInt helpers
Provides shorthands for specific signedness, so that usage code doesn't
need to explicitly use raw booleans.
TypeUInt(32), is easier to gloss than TypeInt(32, false), especially for
those not familiar with the API.
Diffstat (limited to 'include')
-rw-r--r-- | include/sirit/sirit.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/sirit/sirit.h b/include/sirit/sirit.h index 3baa56f..589ea06 100644 --- a/include/sirit/sirit.h +++ b/include/sirit/sirit.h @@ -125,6 +125,12 @@ public: /// Returns type integer. Id TypeInt(int width, bool is_signed); + /// Returns type signed integer. + Id TypeSInt(int width); + + /// Returns type unsigned integer. + Id TypeUInt(int width); + /// Returns type float. Id TypeFloat(int width); |