comparison libinterp/corefcn/pt-jit.cc @ 18968: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 4a4edf0f2077
children db92e7e28e1f
comparison
equal deleted inserted replaced
18967:37c98933f26c 18968:770c0d79341b
2503 : *iter->second; 2503 : *iter->second;
2504 } 2504 }
2505 2505
2506 #endif 2506 #endif
2507 2507
2508 2508 #if defined (HAVE_LLVM)
2509 DEFUN (jit_failure_count, args, nargout, 2509 #define UNUSED_WITHOUT_LLVM(x) x
2510 #else
2511 #define UNUSED_WITHOUT_LLVM(x) x GCC_ATTR_UNUSED
2512 #endif
2513
2514 DEFUN (jit_failure_count, UNUSED_WITHOUT_LLVM (args),
2515 UNUSED_WITHOUT_LLVM (nargout),
2510 "-*- texinfo -*-\n\ 2516 "-*- texinfo -*-\n\
2511 @deftypefn {Built-in Function} {@var{val} =} jit_failure_count ()\n\ 2517 @deftypefn {Built-in Function} {@var{val} =} jit_failure_count ()\n\
2512 @deftypefnx {Built-in Function} {@var{old_val} =} jit_failure_count (@var{new_val})\n\ 2518 @deftypefnx {Built-in Function} {@var{old_val} =} jit_failure_count (@var{new_val})\n\
2513 @deftypefnx {Built-in Function} {} jit_failure_count (@var{new_val}, \"local\")\n\ 2519 @deftypefnx {Built-in Function} {} jit_failure_count (@var{new_val}, \"local\")\n\
2514 Query or set the internal variable that counts the number of\n\ 2520 Query or set the internal variable that counts the number of\n\
2526 warning ("jit_failure_count: JIT compiling not available in this version of Octave"); 2532 warning ("jit_failure_count: JIT compiling not available in this version of Octave");
2527 return octave_value (); 2533 return octave_value ();
2528 #endif 2534 #endif
2529 } 2535 }
2530 2536
2531 DEFUN (debug_jit, args, nargout, 2537 DEFUN (debug_jit, UNUSED_WITHOUT_LLVM (args),
2538 UNUSED_WITHOUT_LLVM (nargout),
2532 "-*- texinfo -*-\n\ 2539 "-*- texinfo -*-\n\
2533 @deftypefn {Built-in Function} {@var{val} =} debug_jit ()\n\ 2540 @deftypefn {Built-in Function} {@var{val} =} debug_jit ()\n\
2534 @deftypefnx {Built-in Function} {@var{old_val} =} debug_jit (@var{new_val})\n\ 2541 @deftypefnx {Built-in Function} {@var{old_val} =} debug_jit (@var{new_val})\n\
2535 @deftypefnx {Built-in Function} {} debug_jit (@var{new_val}, \"local\")\n\ 2542 @deftypefnx {Built-in Function} {} debug_jit (@var{new_val}, \"local\")\n\
2536 Query or set the internal variable that determines whether\n\ 2543 Query or set the internal variable that determines whether\n\
2548 warning ("debug_jit: JIT compiling not available in this version of Octave"); 2555 warning ("debug_jit: JIT compiling not available in this version of Octave");
2549 return octave_value (); 2556 return octave_value ();
2550 #endif 2557 #endif
2551 } 2558 }
2552 2559
2553 DEFUN (jit_enable, args, nargout, 2560 DEFUN (jit_enable, UNUSED_WITHOUT_LLVM (args),
2561 UNUSED_WITHOUT_LLVM (nargout),
2554 "-*- texinfo -*-\n\ 2562 "-*- texinfo -*-\n\
2555 @deftypefn {Built-in Function} {@var{val} =} jit_enable ()\n\ 2563 @deftypefn {Built-in Function} {@var{val} =} jit_enable ()\n\
2556 @deftypefnx {Built-in Function} {@var{old_val} =} jit_enable (@var{new_val})\n\ 2564 @deftypefnx {Built-in Function} {@var{old_val} =} jit_enable (@var{new_val})\n\
2557 @deftypefnx {Built-in Function} {} jit_enable (@var{new_val}, \"local\")\n\ 2565 @deftypefnx {Built-in Function} {} jit_enable (@var{new_val}, \"local\")\n\
2558 Query or set the internal variable that enables Octave's JIT compiler.\n\ 2566 Query or set the internal variable that enables Octave's JIT compiler.\n\
2569 warning ("jit_enable: JIT compiling not available in this version of Octave"); 2577 warning ("jit_enable: JIT compiling not available in this version of Octave");
2570 return octave_value (); 2578 return octave_value ();
2571 #endif 2579 #endif
2572 } 2580 }
2573 2581
2574 DEFUN (jit_startcnt, args, nargout, 2582 DEFUN (jit_startcnt, UNUSED_WITHOUT_LLVM (args),
2583 UNUSED_WITHOUT_LLVM (nargout),
2575 "-*- texinfo -*-\n\ 2584 "-*- texinfo -*-\n\
2576 @deftypefn {Built-in Function} {@var{val} =} jit_startcnt ()\n\ 2585 @deftypefn {Built-in Function} {@var{val} =} jit_startcnt ()\n\
2577 @deftypefnx {Built-in Function} {@var{old_val} =} jit_startcnt (@var{new_val})\n\ 2586 @deftypefnx {Built-in Function} {@var{old_val} =} jit_startcnt (@var{new_val})\n\
2578 @deftypefnx {Built-in Function} {} jit_startcnt (@var{new_val}, \"local\")\n\ 2587 @deftypefnx {Built-in Function} {} jit_startcnt (@var{new_val}, \"local\")\n\
2579 Query or set the internal variable that determines whether JIT compilation\n\ 2588 Query or set the internal variable that determines whether JIT compilation\n\