diff libinterp/corefcn/jit-util.h @ 20654:b65888ec820e draft default tip gccjit

dmalcom gcc jit import
author Stefan Mahr <dac922@gmx.de>
date Fri, 27 Feb 2015 16:59:36 +0100
parents 4197fc428c7d
children
line wrap: on
line diff
--- a/libinterp/corefcn/jit-util.h	Tue Oct 13 11:40:05 2015 +0100
+++ b/libinterp/corefcn/jit-util.h	Fri Feb 27 16:59:36 2015 +0100
@@ -27,10 +27,15 @@
 #if !defined (octave_jit_util_h)
 #define octave_jit_util_h 1
 
-#ifdef HAVE_LLVM
+#ifdef HAVE_JIT
 
 #include <stdexcept>
 
+#ifdef HAVE_GCCJIT
+#include "libgccjit++.h"
+#endif
+
+#if HAVE_LLVM
 #if defined(HAVE_LLVM_IR_DATALAYOUT_H) || defined(HAVE_LLVM_DATALAYOUT_H)
 #define HAVE_LLVM_DATALAYOUT
 #endif
@@ -73,6 +78,7 @@
 typedef IRBuilder<true, ConstantFolder, IRBuilderDefaultInserter<true> >
 IRBuilderD;
 }
+#endif /* if HAVE_LLVM */
 
 class octave_base_value;
 class octave_builtin;
@@ -95,7 +101,9 @@
 };
 
 // llvm doesn't provide this, and it's really useful for debugging
+#if HAVE_LLVM
 std::ostream& operator<< (std::ostream& os, const llvm::Value& v);
+#endif
 
 template <typename HOLDER_T, typename SUB_T>
 class jit_internal_node;
@@ -212,5 +220,5 @@
     return fname (JIT_PARAMS the_args);                                 \
   }
 
+#endif /* ifdef HAVE_JIT */
 #endif
-#endif