aboutsummaryrefslogtreecommitdiff
path: root/gcc/jit/jit-playback.h
diff options
context:
space:
mode:
authorDavid Malcolm <dmalcolm@redhat.com>2014-12-09 20:00:07 +0000
committerDavid Malcolm <dmalcolm@gcc.gnu.org>2014-12-09 20:00:07 +0000
commitd1e5f2c7e2a800e99509aadb9cdc6d3e76eeb1a9 (patch)
tree83b8fc521cc13d74c7018f55655bf98202b25e4b /gcc/jit/jit-playback.h
parent661fce82a67307196182f81dd7d627d05aef4816 (diff)
downloadgcc-d1e5f2c7e2a800e99509aadb9cdc6d3e76eeb1a9.zip
gcc-d1e5f2c7e2a800e99509aadb9cdc6d3e76eeb1a9.tar.gz
gcc-d1e5f2c7e2a800e99509aadb9cdc6d3e76eeb1a9.tar.bz2
Add jit-tempdir.{c|h}
gcc/jit/ChangeLog: PR jit/64206 * Make-lang.in (jit_OBJS): Add jit/jit-tempdir.o. * jit-common.h (gcc::jit::tempdir): New forward decl. * jit-playback.c: Include jit-tempdir.h. (gcc::jit::playback::context::context): Initialize m_tempdir. (gcc::jit::playback::context::~context): Move tempdir cleanup to new file jit-tempdir.c (make_tempdir_path_template): Move to new file jit-tempdir.c. (gcc::jit::playback::context::compile): Move tempdir creation to new tempdir object in new file jit-tempdir.c. (gcc::jit::playback::context::make_fake_args): Get path from tempdir object rather than from member data. (gcc::jit::playback::context::convert_to_dso): Likewise. (gcc::jit::playback::context::dlopen_built_dso): Likewise. (gcc::jit::playback::context::dump_generated_code): Likewise. (gcc::jit::playback::context::get_path_c_file): New function. (gcc::jit::playback::context::get_path_s_file): New function. (gcc::jit::playback::context::get_path_so_file): New function. * jit-playback.h (gcc::jit::playback::context::get_path_c_file): New function. (gcc::jit::playback::context::get_path_s_file): New function. (gcc::jit::playback::context::get_path_so_file): New function. (gcc::jit::playback::context): Move fields "m_path_template", "m_path_tempdir", "m_path_c_file", "m_path_s_file", "m_path_so_file" to new jit::tempdir class; add field "m_tempdir". * jit-tempdir.c: New file. * jit-tempdir.h: New file. From-SVN: r218533
Diffstat (limited to 'gcc/jit/jit-playback.h')
-rw-r--r--gcc/jit/jit-playback.h15
1 files changed, 5 insertions, 10 deletions
diff --git a/gcc/jit/jit-playback.h b/gcc/jit/jit-playback.h
index 1373ecc..22fc283 100644
--- a/gcc/jit/jit-playback.h
+++ b/gcc/jit/jit-playback.h
@@ -231,6 +231,10 @@ private:
void handle_locations ();
+ const char * get_path_c_file () const;
+ const char * get_path_s_file () const;
+ const char * get_path_so_file () const;
+
private:
/* Functions for implementing "compile". */
@@ -259,16 +263,7 @@ private:
private:
::gcc::jit::recording::context *m_recording_ctxt;
- /* Allocated using xmalloc (by xstrdup). */
- char *m_path_template;
-
- /* This either aliases m_path_template, or is NULL. */
- char *m_path_tempdir;
-
- /* The following are allocated using xmalloc. */
- char *m_path_c_file;
- char *m_path_s_file;
- char *m_path_so_file;
+ tempdir *m_tempdir;
auto_vec<function *> m_functions;
tree m_char_array_type_node;