diff options
author | David Malcolm <dmalcolm@redhat.com> | 2015-01-08 22:08:41 +0000 |
---|---|---|
committer | David Malcolm <dmalcolm@gcc.gnu.org> | 2015-01-08 22:08:41 +0000 |
commit | 7c8db13ee3b66cac87319944ed87957a96e1bd6e (patch) | |
tree | a499c6b2da17793da864cb020fd52fbfdb2aa7db | |
parent | 52a98b30b732097047a89038700c21f971e8956d (diff) | |
download | gcc-7c8db13ee3b66cac87319944ed87957a96e1bd6e.zip gcc-7c8db13ee3b66cac87319944ed87957a96e1bd6e.tar.gz gcc-7c8db13ee3b66cac87319944ed87957a96e1bd6e.tar.bz2 |
libgccjit.h: Fix description of struct gcc_jit_context
gcc/jit/ChangeLog:
* libgccjit.h (struct gcc_jit_context): Rewrite the descriptive
comment.
From-SVN: r219366
-rw-r--r-- | gcc/jit/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/jit/libgccjit.h | 19 |
2 files changed, 16 insertions, 8 deletions
diff --git a/gcc/jit/ChangeLog b/gcc/jit/ChangeLog index b1af4f5..796c8a1 100644 --- a/gcc/jit/ChangeLog +++ b/gcc/jit/ChangeLog @@ -1,5 +1,10 @@ 2015-01-08 David Malcolm <dmalcolm@redhat.com> + * libgccjit.h (struct gcc_jit_context): Rewrite the descriptive + comment. + +2015-01-08 David Malcolm <dmalcolm@redhat.com> + * docs/topics/contexts.rst (Error-handling): Document new entrypoint gcc_jit_context_get_last_error. * docs/_build/texinfo/libgccjit.texi: Regenerate. diff --git a/gcc/jit/libgccjit.h b/gcc/jit/libgccjit.h index 953c665..70f26ba 100644 --- a/gcc/jit/libgccjit.h +++ b/gcc/jit/libgccjit.h @@ -31,16 +31,19 @@ extern "C" { **********************************************************************/ /* All structs within the API are opaque. */ -/* A gcc_jit_context encapsulates the state of a compilation. It goes - through two states: +/* A gcc_jit_context encapsulates the state of a compilation. + You can set up options on it, and add types, functions and code, using + the API below. - (1) "initial", during which you can set up options on it, and add - types, functions and code, using the API below. - Invoking gcc_jit_context_compile on it transitions it to the - "after compilation" state. + Invoking gcc_jit_context_compile on it gives you a gcc_jit_result * + (or NULL). - (2) "after compilation", when you can call gcc_jit_context_release to - clean up. */ + You can call gcc_jit_context_compile repeatedly on one context, giving + multiple independent results. + + Eventually you can call gcc_jit_context_release to clean up the + context; any results created from it are still usable, and should be + cleaned up via gcc_jit_result_release. */ typedef struct gcc_jit_context gcc_jit_context; /* A gcc_jit_result encapsulates the result of a compilation. */ |