diff options
author | Sean Callanan <scallanan@apple.com> | 2010-04-13 21:21:57 +0000 |
---|---|---|
committer | Sean Callanan <scallanan@apple.com> | 2010-04-13 21:21:57 +0000 |
commit | 814e69b17115903e68eeb62c2afe9c5d583c03ca (patch) | |
tree | 47c9238d65b65bf7fec4b4087154ec215ff775f0 /llvm/lib/Target/ARM/Disassembler/ARMDisassembler.cpp | |
parent | b935b9370d1800a320635ae5db341d880e8502a0 (diff) | |
download | llvm-814e69b17115903e68eeb62c2afe9c5d583c03ca.zip llvm-814e69b17115903e68eeb62c2afe9c5d583c03ca.tar.gz llvm-814e69b17115903e68eeb62c2afe9c5d583c03ca.tar.bz2 |
Fixed a nasty layering violation in the edis source
code. It used to #include the enhanced disassembly
information for the targets it supported straight
out of lib/Target/{X86,ARM,...} but now it uses a
new interface provided by MCDisassembler, and (so
far) implemented by X86 and ARM.
Also removed hacky #define-controlled initialization
of targets in edis. If clients only want edis to
initialize a limited set of targets, they can set
--enable-targets on the configure command line.
llvm-svn: 101179
Diffstat (limited to 'llvm/lib/Target/ARM/Disassembler/ARMDisassembler.cpp')
-rw-r--r-- | llvm/lib/Target/ARM/Disassembler/ARMDisassembler.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/llvm/lib/Target/ARM/Disassembler/ARMDisassembler.cpp b/llvm/lib/Target/ARM/Disassembler/ARMDisassembler.cpp index 47c3104..f3a9eba 100644 --- a/llvm/lib/Target/ARM/Disassembler/ARMDisassembler.cpp +++ b/llvm/lib/Target/ARM/Disassembler/ARMDisassembler.cpp @@ -18,6 +18,7 @@ #include "ARMDisassembler.h" #include "ARMDisassemblerCore.h" +#include "llvm/MC/EDInstInfo.h" #include "llvm/MC/MCInst.h" #include "llvm/Target/TargetRegistry.h" #include "llvm/Support/Debug.h" @@ -38,7 +39,9 @@ /// #include "../ARMGenDecoderTables.inc" -namespace llvm { +#include "../ARMGenEDInfo.inc" + +using namespace llvm; /// showBitVector - Use the raw_ostream to log a diagnostic message describing /// the inidividual bits of the instruction. @@ -547,4 +550,10 @@ extern "C" void LLVMInitializeARMDisassembler() { createThumbDisassembler); } -} // namespace llvm +EDInstInfo *ARMDisassembler::getEDInfo() const { + return instInfoARM; +} + +EDInstInfo *ThumbDisassembler::getEDInfo() const { + return instInfoARM; +} |