summaryrefslogtreecommitdiff
path: root/lib/Target/PowerPC/Disassembler
diff options
context:
space:
mode:
authorLang Hames <lhames@gmail.com>2014-04-15 04:40:56 +0000
committerLang Hames <lhames@gmail.com>2014-04-15 04:40:56 +0000
commit508bd630466f9625ba07a3f601435e1ff824b768 (patch)
tree4d9ba7c2f255580b8a25ad0a19db9616e7f4fd62 /lib/Target/PowerPC/Disassembler
parent88f353252d6130469d5854efb37659d3ba015c02 (diff)
downloadllvm-508bd630466f9625ba07a3f601435e1ff824b768.tar.gz
llvm-508bd630466f9625ba07a3f601435e1ff824b768.tar.bz2
llvm-508bd630466f9625ba07a3f601435e1ff824b768.tar.xz
[MC] Require an MCContext when constructing an MCDisassembler.
This patch re-introduces the MCContext member that was removed from MCDisassembler in r206063, and requires that an MCContext be passed in at MCDisassembler construction time. (Previously the MCContext member had been initialized in an ad-hoc fashion after construction). The MCCContext member can be used by MCDisassembler sub-classes to construct constant or target-specific MCExprs. This patch updates disassemblers for in-tree targets, and provides the MCRegisterInfo instance that some disassemblers were using through the MCContext (previously those backends were constructing their own MCRegisterInfo instances). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206241 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/PowerPC/Disassembler')
-rw-r--r--lib/Target/PowerPC/Disassembler/PPCDisassembler.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/Target/PowerPC/Disassembler/PPCDisassembler.cpp b/lib/Target/PowerPC/Disassembler/PPCDisassembler.cpp
index c4a7544d49..d0cd49ec9b 100644
--- a/lib/Target/PowerPC/Disassembler/PPCDisassembler.cpp
+++ b/lib/Target/PowerPC/Disassembler/PPCDisassembler.cpp
@@ -22,8 +22,8 @@ typedef MCDisassembler::DecodeStatus DecodeStatus;
namespace {
class PPCDisassembler : public MCDisassembler {
public:
- PPCDisassembler(const MCSubtargetInfo &STI)
- : MCDisassembler(STI) {}
+ PPCDisassembler(const MCSubtargetInfo &STI, MCContext &Ctx)
+ : MCDisassembler(STI, Ctx) {}
virtual ~PPCDisassembler() {}
// Override MCDisassembler.
@@ -37,8 +37,9 @@ public:
} // end anonymous namespace
static MCDisassembler *createPPCDisassembler(const Target &T,
- const MCSubtargetInfo &STI) {
- return new PPCDisassembler(STI);
+ const MCSubtargetInfo &STI,
+ MCContext &Ctx) {
+ return new PPCDisassembler(STI, Ctx);
}
extern "C" void LLVMInitializePowerPCDisassembler() {