Fix ConstantExpr opcode to use C++ enum values.
Note: C++ opcode is different from C opcode values. Add ConstantExpr opcode name. Add test for these.
This commit is contained in:
parent
76c60adbca
commit
5d14461c84
5 changed files with 51 additions and 3 deletions
|
|
@ -1174,7 +1174,11 @@ class Constant(User):
|
|||
class ConstantExpr(Constant):
|
||||
@property
|
||||
def opcode(self):
|
||||
return _core.LLVMGetConstOpcode(self.ptr)
|
||||
return _core.LLVMGetConstExprOpcode(self.ptr)
|
||||
|
||||
@property
|
||||
def opcode_name(self):
|
||||
return _core.LLVMGetConstExprOpcodeName(self.ptr)
|
||||
|
||||
|
||||
class ConstantAggregateZero(Constant):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue