aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/MC/MCDisassembler/Disassembler.h
diff options
context:
space:
mode:
authorKevin Enderby <enderby@apple.com>2012-12-18 23:47:28 +0000
committerKevin Enderby <enderby@apple.com>2012-12-18 23:47:28 +0000
commit85cf531593039e0d9e4d95114e9a588df45498a6 (patch)
tree3c15d51654e8ed43002455a37ed648a01054a983 /llvm/lib/MC/MCDisassembler/Disassembler.h
parent0b510bca73be0ced95a68b1accfd3bf4fdc290ae (diff)
downloadllvm-85cf531593039e0d9e4d95114e9a588df45498a6.zip
llvm-85cf531593039e0d9e4d95114e9a588df45498a6.tar.gz
llvm-85cf531593039e0d9e4d95114e9a588df45498a6.tar.bz2
Add to the disassembler C API an option to print the disassembled
instructions in the assembly code variant if one exists. The intended use for this is so tools like lldb and darwin's otool(1) can be switched to print Intel-flavored disassembly. I discussed extensively this API with Jim Grosbach and we feel while it may not be fully general, in reality there is only one syntax for each assembly with the exception of X86 which has exactly two for historical reasons. rdar://10989182 llvm-svn: 170477
Diffstat (limited to 'llvm/lib/MC/MCDisassembler/Disassembler.h')
-rw-r--r--llvm/lib/MC/MCDisassembler/Disassembler.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/MC/MCDisassembler/Disassembler.h b/llvm/lib/MC/MCDisassembler/Disassembler.h
index 28cf04b..6eb59d0 100644
--- a/llvm/lib/MC/MCDisassembler/Disassembler.h
+++ b/llvm/lib/MC/MCDisassembler/Disassembler.h
@@ -109,7 +109,11 @@ public:
const Target *getTarget() const { return TheTarget; }
const MCDisassembler *getDisAsm() const { return DisAsm.get(); }
const MCAsmInfo *getAsmInfo() const { return MAI.get(); }
+ const MCInstrInfo *getInstrInfo() const { return MII.get(); }
+ const MCRegisterInfo *getRegisterInfo() const { return MRI.get(); }
+ const MCSubtargetInfo *getSubtargetInfo() const { return MSI.get(); }
MCInstPrinter *getIP() { return IP.get(); }
+ void setIP(MCInstPrinter *NewIP) { IP.reset(NewIP); }
};
} // namespace llvm