summaryrefslogtreecommitdiffstats
path: root/llvm/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
commita1bc0f56623b4ca1851d27c9f64cccdfdc055c06 (patch)
treedd9fe4641d2c5e95538962439dc0030c923df47a /llvm/lib/Target/PowerPC/Disassembler
parent33ec29ace9e2437fa818fba61d3ed8c558bba6ce (diff)
downloadbcm5719-llvm-a1bc0f56623b4ca1851d27c9f64cccdfdc055c06.tar.gz
bcm5719-llvm-a1bc0f56623b4ca1851d27c9f64cccdfdc055c06.zip
[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). llvm-svn: 206241
Diffstat (limited to 'llvm/lib/Target/PowerPC/Disassembler')
-rw-r--r--llvm/lib/Target/PowerPC/Disassembler/PPCDisassembler.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/llvm/lib/Target/PowerPC/Disassembler/PPCDisassembler.cpp b/llvm/lib/Target/PowerPC/Disassembler/PPCDisassembler.cpp
index c4a7544d494..d0cd49ec9b0 100644
--- a/llvm/lib/Target/PowerPC/Disassembler/PPCDisassembler.cpp
+++ b/llvm/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() {
OpenPOWER on IntegriCloud