aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorLioncash <[email protected]>2021-07-27 08:28:59 -0400
committerRodrigo Locatti <[email protected]>2021-07-27 22:11:21 -0300
commit8cfe8badf70a7da0fa41e7f236bd6c5e52fa41ff (patch)
tree583fd0cc91e2575e40f3563b16180620c323be1f /include
parenta39596358a3a5488c06554c0c15184a6af71e433 (diff)
downloadsirit-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.h6
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);