Mercurial > octave-libgccjit
changeset 18934:770c0d79341b
avoid some unused variable warnings if LLVM is not available
* pt-jit.cc (UNUSED_WITHOUT_LLVM): New macro. Use it to tag args and
nargout variables in functions that only work with LLVM.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 17 Jul 2014 11:48:32 -0400 |
parents | 37c98933f26c |
children | 576e4f86ea62 |
files | libinterp/corefcn/pt-jit.cc |
diffstat | 1 files changed, 14 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/corefcn/pt-jit.cc Thu Jul 17 11:47:36 2014 -0400 +++ b/libinterp/corefcn/pt-jit.cc Thu Jul 17 11:48:32 2014 -0400 @@ -2505,8 +2505,14 @@ #endif - -DEFUN (jit_failure_count, args, nargout, +#if defined (HAVE_LLVM) +#define UNUSED_WITHOUT_LLVM(x) x +#else +#define UNUSED_WITHOUT_LLVM(x) x GCC_ATTR_UNUSED +#endif + +DEFUN (jit_failure_count, UNUSED_WITHOUT_LLVM (args), + UNUSED_WITHOUT_LLVM (nargout), "-*- texinfo -*-\n\ @deftypefn {Built-in Function} {@var{val} =} jit_failure_count ()\n\ @deftypefnx {Built-in Function} {@var{old_val} =} jit_failure_count (@var{new_val})\n\ @@ -2528,7 +2534,8 @@ #endif } -DEFUN (debug_jit, args, nargout, +DEFUN (debug_jit, UNUSED_WITHOUT_LLVM (args), + UNUSED_WITHOUT_LLVM (nargout), "-*- texinfo -*-\n\ @deftypefn {Built-in Function} {@var{val} =} debug_jit ()\n\ @deftypefnx {Built-in Function} {@var{old_val} =} debug_jit (@var{new_val})\n\ @@ -2550,7 +2557,8 @@ #endif } -DEFUN (jit_enable, args, nargout, +DEFUN (jit_enable, UNUSED_WITHOUT_LLVM (args), + UNUSED_WITHOUT_LLVM (nargout), "-*- texinfo -*-\n\ @deftypefn {Built-in Function} {@var{val} =} jit_enable ()\n\ @deftypefnx {Built-in Function} {@var{old_val} =} jit_enable (@var{new_val})\n\ @@ -2571,7 +2579,8 @@ #endif } -DEFUN (jit_startcnt, args, nargout, +DEFUN (jit_startcnt, UNUSED_WITHOUT_LLVM (args), + UNUSED_WITHOUT_LLVM (nargout), "-*- texinfo -*-\n\ @deftypefn {Built-in Function} {@var{val} =} jit_startcnt ()\n\ @deftypefnx {Built-in Function} {@var{old_val} =} jit_startcnt (@var{new_val})\n\