aboutsummaryrefslogtreecommitdiff
path: root/gcc/jit/jit-builtins.c
diff options
context:
space:
mode:
authorDavid Malcolm <dmalcolm@redhat.com>2014-12-01 17:22:19 +0000
committerDavid Malcolm <dmalcolm@gcc.gnu.org>2014-12-01 17:22:19 +0000
commitc8d19a69348ddcf0e539022fe89b1dcea3835a59 (patch)
tree990760a012debff08c2e3175f91ef5fd8c611529 /gcc/jit/jit-builtins.c
parent9370adeb9da5071af3685adbd697784bdd349cc9 (diff)
downloadgcc-c8d19a69348ddcf0e539022fe89b1dcea3835a59.zip
gcc-c8d19a69348ddcf0e539022fe89b1dcea3835a59.tar.gz
gcc-c8d19a69348ddcf0e539022fe89b1dcea3835a59.tar.bz2
PR jit/63854: Fix leak within jit-builtins.c
gcc/jit/ChangeLog: PR jit/63854 * jit-builtins.c (gcc::jit::recording::builtins_manager::make_fn_type): Call the context's new_function_type method, rather than directly creating a function_type instance. * jit-recording.c (gcc::jit::recording::context::new_function_type): New method, adapted from part of... (gcc::jit::recording::context::new_function_ptr_type): ...this. Update to call new_function_type. * jit-recording.h (gcc::jit::recording::context::new_function_type): New method. From-SVN: r218231
Diffstat (limited to 'gcc/jit/jit-builtins.c')
-rw-r--r--gcc/jit/jit-builtins.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/gcc/jit/jit-builtins.c b/gcc/jit/jit-builtins.c
index 07902e8..49d37d8 100644
--- a/gcc/jit/jit-builtins.c
+++ b/gcc/jit/jit-builtins.c
@@ -398,11 +398,10 @@ builtins_manager::make_fn_type (enum jit_builtin_type,
if (!return_type)
goto error;
- result = new function_type (m_ctxt,
- return_type,
- num_args,
- param_types,
- is_variadic);
+ result = m_ctxt->new_function_type (return_type,
+ num_args,
+ param_types,
+ is_variadic);
error:
delete[] param_types;