aboutsummaryrefslogtreecommitdiff
path: root/gcc/jit
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2024-03-29 18:56:33 +0100
committerGuillaume Gomez <guillaume1.gomez@gmail.com>2024-03-29 19:05:48 +0100
commit4c18ace1cb69a31af4ac719850a66de79ed12e93 (patch)
tree12278c9acee74bb153e4785c52bfcd8c04ead977 /gcc/jit
parent28dca4be504dda29f55eafe958cdf299ec89b94e (diff)
downloadgcc-4c18ace1cb69a31af4ac719850a66de79ed12e93.zip
gcc-4c18ace1cb69a31af4ac719850a66de79ed12e93.tar.gz
gcc-4c18ace1cb69a31af4ac719850a66de79ed12e93.tar.bz2
[PATCH] Allow `gcc_jit_type_get_size` to work with pointers
gcc/jit/ChangeLog: * libgccjit.cc (gcc_jit_type_get_size): Add pointer support
Diffstat (limited to 'gcc/jit')
-rw-r--r--gcc/jit/libgccjit.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/jit/libgccjit.cc b/gcc/jit/libgccjit.cc
index f40a978..445c0d0 100644
--- a/gcc/jit/libgccjit.cc
+++ b/gcc/jit/libgccjit.cc
@@ -560,8 +560,8 @@ gcc_jit_type_get_size (gcc_jit_type *type)
{
RETURN_VAL_IF_FAIL (type, -1, NULL, NULL, "NULL type");
RETURN_VAL_IF_FAIL
- (type->is_int () || type->is_float (), -1, NULL, NULL,
- "only getting the size of integer or floating-point types is supported for now");
+ (type->is_int () || type->is_float () || type->is_pointer (), -1, NULL, NULL,
+ "only getting the size of integer or floating-point or pointer types is supported for now");
return type->get_size ();
}