diff options
author | Ulrich Drepper <drepper@gmail.com> | 2014-12-11 04:31:52 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@gcc.gnu.org> | 2014-12-11 04:31:52 +0000 |
commit | c168eab92cc42d3c995cc0a1188e1554ebbcd63a (patch) | |
tree | 6a17665d977c9ac21479af8adc84e430135b76f1 /gcc/jit/libgccjit.h | |
parent | 67dab5e0a39887550a9d8681998ae7c5c723ccb7 (diff) | |
download | gcc-c168eab92cc42d3c995cc0a1188e1554ebbcd63a.zip gcc-c168eab92cc42d3c995cc0a1188e1554ebbcd63a.tar.gz gcc-c168eab92cc42d3c995cc0a1188e1554ebbcd63a.tar.bz2 |
Minor interface cleanups of libgccjit
Minor interface cleanups of libgccjit
* jit/jit-playback.c (convert_to_dso): Use auto_vec instead
of automatic array to build up command line.
* jit/jit-recording.c (recording::context::set_str_option):
Make copy of the string.
(recording::context::~context): Free string options.
* jit/jit-recording.h (recording::context): Adjust type
of m_str_options member.
* jit/libgccjit.h: Adjust comment about
gcc_jit_context_set_str_option parameter begin used after
the call.
Update comment now that all interfaces are copy strings
if necessary.
* jit/libgccjit++.h (gccjit::context): Add set_str_option
member function.
From-SVN: r218617
Diffstat (limited to 'gcc/jit/libgccjit.h')
-rw-r--r-- | gcc/jit/libgccjit.h | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/gcc/jit/libgccjit.h b/gcc/jit/libgccjit.h index 71628e0..7fc4928 100644 --- a/gcc/jit/libgccjit.h +++ b/gcc/jit/libgccjit.h @@ -50,15 +50,15 @@ typedef struct gcc_jit_result gcc_jit_result; The class hierarchy looks like this: +- gcc_jit_object - +- gcc_jit_location - +- gcc_jit_type + +- gcc_jit_location + +- gcc_jit_type +- gcc_jit_struct - +- gcc_jit_field - +- gcc_jit_function - +- gcc_jit_block - +- gcc_jit_rvalue - +- gcc_jit_lvalue - +- gcc_jit_param + +- gcc_jit_field + +- gcc_jit_function + +- gcc_jit_block + +- gcc_jit_rvalue + +- gcc_jit_lvalue + +- gcc_jit_param */ typedef struct gcc_jit_object gcc_jit_object; @@ -213,8 +213,9 @@ enum gcc_jit_bool_option /* Set a string option on the given context. - The context directly stores the (const char *), so the passed string - must outlive the context. */ + The context takes a copy of the string, so the + (const char *) buffer is not needed anymore after the call + returns. */ extern void gcc_jit_context_set_str_option (gcc_jit_context *ctxt, enum gcc_jit_str_option opt, @@ -288,8 +289,7 @@ gcc_jit_result_release (gcc_jit_result *result); released their context. All (const char *) string arguments passed to these functions are - copied, so you don't need to keep them around. Note that this *isn't* - the case for other parts of the API. + copied, so you don't need to keep them around. You create code by adding a sequence of statements to blocks. **********************************************************************/ |