Merge pull request #15 from laanwj/2012_08_constantexpr_opcode
Implement property ConstantExpr.opcode
This commit is contained in:
commit
76c60adbca
2 changed files with 5 additions and 1 deletions
|
|
@ -485,6 +485,7 @@ _wrap_list2obj(LLVMConstVector, LLVMValueRef, LLVMValueRef)
|
||||||
|
|
||||||
/* Constant expressions */
|
/* Constant expressions */
|
||||||
|
|
||||||
|
_wrap_obj2obj(LLVMGetConstOpcode, LLVMValueRef, int)
|
||||||
_wrap_obj2obj(LLVMSizeOf, LLVMTypeRef, LLVMValueRef)
|
_wrap_obj2obj(LLVMSizeOf, LLVMTypeRef, LLVMValueRef)
|
||||||
_wrap_obj2obj(LLVMConstNeg, LLVMValueRef, LLVMValueRef)
|
_wrap_obj2obj(LLVMConstNeg, LLVMValueRef, LLVMValueRef)
|
||||||
_wrap_obj2obj(LLVMConstNot, LLVMValueRef, LLVMValueRef)
|
_wrap_obj2obj(LLVMConstNot, LLVMValueRef, LLVMValueRef)
|
||||||
|
|
@ -1579,6 +1580,7 @@ static PyMethodDef core_methods[] = {
|
||||||
_method( LLVMConstVector )
|
_method( LLVMConstVector )
|
||||||
|
|
||||||
/* Constant expressions */
|
/* Constant expressions */
|
||||||
|
_method( LLVMGetConstOpcode )
|
||||||
_method( LLVMSizeOf )
|
_method( LLVMSizeOf )
|
||||||
_method( LLVMConstNeg )
|
_method( LLVMConstNeg )
|
||||||
_method( LLVMConstNot )
|
_method( LLVMConstNot )
|
||||||
|
|
|
||||||
|
|
@ -1172,7 +1172,9 @@ class Constant(User):
|
||||||
|
|
||||||
|
|
||||||
class ConstantExpr(Constant):
|
class ConstantExpr(Constant):
|
||||||
pass
|
@property
|
||||||
|
def opcode(self):
|
||||||
|
return _core.LLVMGetConstOpcode(self.ptr)
|
||||||
|
|
||||||
|
|
||||||
class ConstantAggregateZero(Constant):
|
class ConstantAggregateZero(Constant):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue