added opcode property to llvm.mc.Instr

This commit is contained in:
anthony cantor 2013-09-03 00:10:41 -06:00 • committed by Siu Kwan Lam
commit 65c4558cac
2 changed files with 7 additions and 2 deletions

View file

@ -91,7 +91,7 @@ class Instr(object):
@property
def instr_desc(self):
return self.tm.instr_info.get(self.mcinst.getOpcode())
return self.tm.instr_info.get(self.opcode)
@property
def flags(self):
@ -101,6 +101,11 @@ class Instr(object):
def ts_flags(self):
return self.instr_desc.TSFlags
@property
def opcode(self):
return self.mcinst.getOpcode()
class BadInstr(Instr):
pass