From 25e6651055453bc04eb202636e08c8942b66c256 Mon Sep 17 00:00:00 2001 From: anthony cantor Date: Thu, 15 Aug 2013 02:11:48 -0600 Subject: [PATCH] added MCOperand methods --- llvmpy/src/MC/__init__.py | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/llvmpy/src/MC/__init__.py b/llvmpy/src/MC/__init__.py index 276f4f9..7e8dfcc 100644 --- a/llvmpy/src/MC/__init__.py +++ b/llvmpy/src/MC/__init__.py @@ -7,14 +7,32 @@ MCSubtargetInfo = llvm.Class() MCDisassembler = llvm.Class() MCInst = llvm.Class() MCOperand = llvm.Class() +MCExpr = llvm.Class() @MCSubtargetInfo class MCSubtargetInfo: pass +@MCExpr +class MCExpr: + _include_ = "llvm/MC/MCExpr.h" + @MCOperand class MCOperand: - pass + _include_ = "llvm/MC/MCInst.h" + + isValid = Method(cast(Bool, bool)) + isReg = Method(cast(Bool, bool)) + isImm = Method(cast(Bool, bool)) + isFPImm = Method(cast(Bool, bool)) + isExpr = Method(cast(Bool, bool)) + isInst = Method(cast(Bool, bool)) + + getReg = Method(cast(Unsigned, int)) + getImm = Method(cast(Int64, int)) + getFPImm = Method(cast(Double, float)) + getExpr = Method(const(ptr(MCExpr))) + @MCInst class MCInst: