Skip to content

Commit

Permalink
Make new_array_type take unsigned long
Browse files Browse the repository at this point in the history
  • Loading branch information
antoyo committed Mar 4, 2023
1 parent 5d25bd6 commit c97bc65
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion gcc/jit/jit-playback.cc
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ playback::type *
playback::context::
new_array_type (playback::location *loc,
playback::type *element_type,
int num_elements)
unsigned long num_elements)
{
gcc_assert (element_type);

Expand Down
2 changes: 1 addition & 1 deletion gcc/jit/jit-playback.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class context : public log_user
type *
new_array_type (location *loc,
type *element_type,
int num_elements);
unsigned long num_elements);

field *
new_field (location *loc,
Expand Down
6 changes: 3 additions & 3 deletions gcc/jit/jit-recording.cc
Original file line number Diff line number Diff line change
Expand Up @@ -840,7 +840,7 @@ recording::context::get_int_type (int num_bytes, int is_signed)
recording::type *
recording::context::new_array_type (recording::location *loc,
recording::type *element_type,
int num_elements)
unsigned long num_elements)
{
/*if (struct_ *s = element_type->dyn_cast_struct ())
if (!s->get_fields ())
Expand Down Expand Up @@ -3175,7 +3175,7 @@ recording::string *
recording::array_type::make_debug_string ()
{
return string::from_printf (m_ctxt,
"%s[%d]",
"%s[%ld]",
m_element_type->get_debug_string (),
m_num_elements);
}
Expand All @@ -3191,7 +3191,7 @@ recording::array_type::write_reproducer (reproducer &r)
" gcc_jit_context_new_array_type (%s,\n"
" %s, /* gcc_jit_location *loc */\n"
" %s, /* gcc_jit_type *element_type */\n"
" %i); /* int num_elements */\n",
" %li); /* int num_elements */\n",
id,
r.get_identifier (get_context ()),
r.get_identifier (m_loc),
Expand Down
8 changes: 4 additions & 4 deletions gcc/jit/jit-recording.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ class context : public log_user
type *
new_array_type (location *loc,
type *element_type,
int num_elements);
unsigned long num_elements);

field *
new_field (location *loc,
Expand Down Expand Up @@ -904,7 +904,7 @@ class array_type : public type
array_type (context *ctxt,
location *loc,
type *element_type,
int num_elements)
unsigned long num_elements)
: type (ctxt),
m_loc (loc),
m_element_type (element_type),
Expand All @@ -925,7 +925,7 @@ class array_type : public type
bool is_bool () const final override { return false; }
type *is_pointer () final override { return NULL; }
type *is_array () final override { return m_element_type; }
int num_elements () { return m_num_elements; }
unsigned long num_elements () { return m_num_elements; }
bool is_signed () const final override { return false; }

void replay_into (replayer *) final override;
Expand All @@ -937,7 +937,7 @@ class array_type : public type
private:
location *m_loc;
type *m_element_type;
int m_num_elements;
unsigned long m_num_elements;
};

class function_type : public type
Expand Down
2 changes: 1 addition & 1 deletion gcc/jit/libgccjit.cc
Original file line number Diff line number Diff line change
Expand Up @@ -765,7 +765,7 @@ gcc_jit_type *
gcc_jit_context_new_array_type (gcc_jit_context *ctxt,
gcc_jit_location *loc,
gcc_jit_type *element_type,
int num_elements)
unsigned long num_elements)
{
RETURN_NULL_IF_FAIL (ctxt, NULL, loc, "NULL context");
JIT_LOG_FUNC (ctxt->get_logger ());
Expand Down
2 changes: 1 addition & 1 deletion gcc/jit/libgccjit.h
Original file line number Diff line number Diff line change
Expand Up @@ -654,7 +654,7 @@ extern gcc_jit_type *
gcc_jit_context_new_array_type (gcc_jit_context *ctxt,
gcc_jit_location *loc,
gcc_jit_type *element_type,
int num_elements);
unsigned long num_elements);

/* Struct-handling. */

Expand Down

0 comments on commit c97bc65

Please sign in to comment.