forked from OSchip/llvm-project
add a gross hack to get "SrcLine" comments to show up with the
new asmprinter. Differently gross hack coming next. llvm-svn: 81379
This commit is contained in:
parent
84c6f0a1e6
commit
d9e12345af
|
@ -132,13 +132,18 @@ public:
|
|||
class MCInst {
|
||||
unsigned Opcode;
|
||||
SmallVector<MCOperand, 8> Operands;
|
||||
|
||||
// FIXME: This is a hack!
|
||||
DebugLoc Loc;
|
||||
public:
|
||||
MCInst() : Opcode(~0U) {}
|
||||
|
||||
void setOpcode(unsigned Op) { Opcode = Op; }
|
||||
|
||||
unsigned getOpcode() const { return Opcode; }
|
||||
DebugLoc getDebugLoc() const { return DebugLoc(); }
|
||||
|
||||
void setDebugLoc(DebugLoc L) { Loc = L; }
|
||||
DebugLoc getDebugLoc() const { return Loc; }
|
||||
|
||||
const MCOperand &getOperand(unsigned i) const { return Operands[i]; }
|
||||
MCOperand &getOperand(unsigned i) { return Operands[i]; }
|
||||
|
|
|
@ -267,6 +267,7 @@ MCOperand X86ATTAsmPrinter::LowerSymbolOperand(const MachineOperand &MO,
|
|||
void X86ATTAsmPrinter::
|
||||
printInstructionThroughMCStreamer(const MachineInstr *MI) {
|
||||
MCInst TmpInst;
|
||||
TmpInst.setDebugLoc(MI->getDebugLoc());
|
||||
switch (MI->getOpcode()) {
|
||||
case TargetInstrInfo::DBG_LABEL:
|
||||
case TargetInstrInfo::EH_LABEL:
|
||||
|
|
Loading…
Reference in New Issue