Adding support for building the "insertvalue" instruction.

This commit is contained in:
Jon Riehl 2012-08-17 15:52:07 -05:00
commit 7c22f37b57
3 changed files with 35 additions and 0 deletions

View file

@ -659,6 +659,32 @@ _w ## func (PyObject *self, PyObject *args) \
return ctor_ ## outtype ( func (arg1, arg2, arg3, arg4)) ; \
}
/**
* Wrap LLVM functions of the type
* outtype func(intype1 arg1, intype2 arg2, intype3, int arg3, const char *arg4)
*/
#define _wrap_objobjobjintstr2obj(func, intype1, intype2, intype3, outtype) \
static PyObject * \
_w ## func (PyObject *self, PyObject *args) \
{ \
PyObject *obj1, *obj2, *obj3; \
intype1 arg1; \
intype2 arg2; \
intype3 arg3; \
int arg4; \
const char *arg5; \
\
if (!PyArg_ParseTuple(args, "OOOis", &obj1, &obj2, &obj3, &arg4, \
&arg5)) \
return NULL; \
\
arg1 = ( intype1 ) PyCapsule_GetPointer(obj1, NULL); \
arg2 = ( intype2 ) PyCapsule_GetPointer(obj2, NULL); \
arg3 = ( intype3 ) PyCapsule_GetPointer(obj3, NULL); \
\
return ctor_ ## outtype ( func (arg1, arg2, arg3, arg4, arg5)) ; \
}
/**
* Wrap LLVM functions of the type
* outtype func(intype1 arg1, intype2 arg2, intype3 arg3, const char *arg4)