Commit b8e49c18 by David Sehr

Add a getTarget method that returns the x86 target lowering

Remove a bit of complex repeated template naming. BUG= R=jpp@chromium.org, stichnot@chromium.org Review URL: https://codereview.chromium.org/1438933002 .
parent 8099e9ac
......@@ -35,6 +35,7 @@ template <class Machine> class InstX86Base : public InstTarget {
public:
using Traits = MachineTraits<Machine>;
using X86TargetLowering = typename Traits::TargetLowering;
enum InstKindX86 {
k__Start = Inst::Target,
......@@ -156,6 +157,10 @@ public:
const Operand *Src,
const typename Traits::Assembler::GPREmitterShiftOp &Emitter);
static X86TargetLowering *getTarget(const Cfg* Func) {
return static_cast<X86TargetLowering *>(Func->getTarget());
}
protected:
InstX86Base<Machine>(Cfg *Func, InstKindX86 Kind, SizeT Maxsrcs,
Variable *Dest)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment