Skip to content

Commit c97bc65

Browse files
committed
Make new_array_type take unsigned long
1 parent 5d25bd6 commit c97bc65

6 files changed

+11
-11
lines changed

gcc/jit/jit-playback.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ playback::type *
329329
playback::context::
330330
new_array_type (playback::location *loc,
331331
playback::type *element_type,
332-
int num_elements)
332+
unsigned long num_elements)
333333
{
334334
gcc_assert (element_type);
335335

gcc/jit/jit-playback.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ class context : public log_user
7474
type *
7575
new_array_type (location *loc,
7676
type *element_type,
77-
int num_elements);
77+
unsigned long num_elements);
7878

7979
field *
8080
new_field (location *loc,

gcc/jit/jit-recording.cc

+3-3
Original file line numberDiff line numberDiff line change
@@ -840,7 +840,7 @@ recording::context::get_int_type (int num_bytes, int is_signed)
840840
recording::type *
841841
recording::context::new_array_type (recording::location *loc,
842842
recording::type *element_type,
843-
int num_elements)
843+
unsigned long num_elements)
844844
{
845845
/*if (struct_ *s = element_type->dyn_cast_struct ())
846846
if (!s->get_fields ())
@@ -3175,7 +3175,7 @@ recording::string *
31753175
recording::array_type::make_debug_string ()
31763176
{
31773177
return string::from_printf (m_ctxt,
3178-
"%s[%d]",
3178+
"%s[%ld]",
31793179
m_element_type->get_debug_string (),
31803180
m_num_elements);
31813181
}
@@ -3191,7 +3191,7 @@ recording::array_type::write_reproducer (reproducer &r)
31913191
" gcc_jit_context_new_array_type (%s,\n"
31923192
" %s, /* gcc_jit_location *loc */\n"
31933193
" %s, /* gcc_jit_type *element_type */\n"
3194-
" %i); /* int num_elements */\n",
3194+
" %li); /* int num_elements */\n",
31953195
id,
31963196
r.get_identifier (get_context ()),
31973197
r.get_identifier (m_loc),

gcc/jit/jit-recording.h

+4-4
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ class context : public log_user
9999
type *
100100
new_array_type (location *loc,
101101
type *element_type,
102-
int num_elements);
102+
unsigned long num_elements);
103103

104104
field *
105105
new_field (location *loc,
@@ -904,7 +904,7 @@ class array_type : public type
904904
array_type (context *ctxt,
905905
location *loc,
906906
type *element_type,
907-
int num_elements)
907+
unsigned long num_elements)
908908
: type (ctxt),
909909
m_loc (loc),
910910
m_element_type (element_type),
@@ -925,7 +925,7 @@ class array_type : public type
925925
bool is_bool () const final override { return false; }
926926
type *is_pointer () final override { return NULL; }
927927
type *is_array () final override { return m_element_type; }
928-
int num_elements () { return m_num_elements; }
928+
unsigned long num_elements () { return m_num_elements; }
929929
bool is_signed () const final override { return false; }
930930

931931
void replay_into (replayer *) final override;
@@ -937,7 +937,7 @@ class array_type : public type
937937
private:
938938
location *m_loc;
939939
type *m_element_type;
940-
int m_num_elements;
940+
unsigned long m_num_elements;
941941
};
942942

943943
class function_type : public type

gcc/jit/libgccjit.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -765,7 +765,7 @@ gcc_jit_type *
765765
gcc_jit_context_new_array_type (gcc_jit_context *ctxt,
766766
gcc_jit_location *loc,
767767
gcc_jit_type *element_type,
768-
int num_elements)
768+
unsigned long num_elements)
769769
{
770770
RETURN_NULL_IF_FAIL (ctxt, NULL, loc, "NULL context");
771771
JIT_LOG_FUNC (ctxt->get_logger ());

gcc/jit/libgccjit.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -654,7 +654,7 @@ extern gcc_jit_type *
654654
gcc_jit_context_new_array_type (gcc_jit_context *ctxt,
655655
gcc_jit_location *loc,
656656
gcc_jit_type *element_type,
657-
int num_elements);
657+
unsigned long num_elements);
658658

659659
/* Struct-handling. */
660660

0 commit comments

Comments
 (0)