aboutsummaryrefslogtreecommitdiff
path: root/gcc/jit/jit-playback.c
diff options
context:
space:
mode:
authorDavid Malcolm <dmalcolm@redhat.com>2014-12-01 17:52:03 +0000
committerDavid Malcolm <dmalcolm@gcc.gnu.org>2014-12-01 17:52:03 +0000
commit56dea35f948f84bff37051141893e1d237c3d0f9 (patch)
treee01e97dd200d920f68a44c0ffbf55499ae2b1fe5 /gcc/jit/jit-playback.c
parent52b9468f1575b87e490cc3fdcff4c51f25fb49c1 (diff)
downloadgcc-56dea35f948f84bff37051141893e1d237c3d0f9.zip
gcc-56dea35f948f84bff37051141893e1d237c3d0f9.tar.gz
gcc-56dea35f948f84bff37051141893e1d237c3d0f9.tar.bz2
Move gcc_jit_result implementation to a new files jit-result.{h|c}
gcc/jit/ChangeLog: * Make-lang.in (jit_OBJS): Add jit/jit-result.o. * jit-playback.c: Include new header jit-result.h. (gcc::jit::result::result): Move to new file jit-result.c. (gcc::jit::result::~result): Likewise. (gcc::jit::playback::result): Likewise. * jit-recording.h (class gcc::jit::result): Move to new header jit-result.h. * jit-result.c: New file, to contain... (gcc::jit::result::result): Move here from jit-playback.c, removing erroneous "playback" namespace from comment. (gcc::jit::result::~result): Likewise. (gcc::jit::playback::result): Likewise. * jit-result.h: New file, to contain... (class gcc::jit::result): Move from jit-recording.h. * libgccjit.c: Include jit-result.h. (gcc_jit_result_get_code): Update comment to reflect move of implementation. (gcc_jit_result_release): Likewise. From-SVN: r218236
Diffstat (limited to 'gcc/jit/jit-playback.c')
-rw-r--r--gcc/jit/jit-playback.c43
1 files changed, 1 insertions, 42 deletions
diff --git a/gcc/jit/jit-playback.c b/gcc/jit/jit-playback.c
index 584a8e6..cd124eb 100644
--- a/gcc/jit/jit-playback.c
+++ b/gcc/jit/jit-playback.c
@@ -49,6 +49,7 @@ along with GCC; see the file COPYING3. If not see
#include "jit-common.h"
#include "jit-playback.h"
+#include "jit-result.h"
/* gcc::jit::playback::context::build_cast uses the convert.h API,
@@ -1951,48 +1952,6 @@ add_error_va (location *loc, const char *fmt, va_list ap)
fmt, ap);
}
-/* Constructor for gcc::jit::playback::result. */
-
-result::
-result(void *dso_handle)
- : m_dso_handle(dso_handle)
-{
-}
-
-/* gcc::jit::playback::result's destructor.
-
- Called implicitly by gcc_jit_result_release. */
-
-result::~result()
-{
- dlclose (m_dso_handle);
-}
-
-/* Attempt to locate the given function by name within the
- playback::result, using dlsym.
-
- Implements the post-error-checking part of
- gcc_jit_result_get_code. */
-
-void *
-result::
-get_code (const char *funcname)
-{
- void *code;
- const char *error;
-
- /* Clear any existing error. */
- dlerror ();
-
- code = dlsym (m_dso_handle, funcname);
-
- if ((error = dlerror()) != NULL) {
- fprintf(stderr, "%s\n", error);
- }
-
- return code;
-}
-
/* Dealing with the linemap API. */
/* Construct a playback::location for a recording::location, if it