mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-27 12:26:08 +00:00
Add AsmPrinter comment flags to machine instructions so that AsmPrinter
can emit extra information in comments. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@87018 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -19,6 +19,7 @@
|
|||||||
#include "llvm/ADT/ilist.h"
|
#include "llvm/ADT/ilist.h"
|
||||||
#include "llvm/ADT/ilist_node.h"
|
#include "llvm/ADT/ilist_node.h"
|
||||||
#include "llvm/ADT/STLExtras.h"
|
#include "llvm/ADT/STLExtras.h"
|
||||||
|
#include "llvm/CodeGen/AsmPrinter.h"
|
||||||
#include "llvm/CodeGen/MachineOperand.h"
|
#include "llvm/CodeGen/MachineOperand.h"
|
||||||
#include "llvm/Target/TargetInstrDesc.h"
|
#include "llvm/Target/TargetInstrDesc.h"
|
||||||
#include "llvm/Support/DebugLoc.h"
|
#include "llvm/Support/DebugLoc.h"
|
||||||
@@ -45,6 +46,13 @@ private:
|
|||||||
unsigned short NumImplicitOps; // Number of implicit operands (which
|
unsigned short NumImplicitOps; // Number of implicit operands (which
|
||||||
// are determined at construction time).
|
// are determined at construction time).
|
||||||
|
|
||||||
|
unsigned short AsmPrinterFlags; // Various bits of information used by
|
||||||
|
// the AsmPrinter to emit helpful
|
||||||
|
// comments. This is *not* semantic
|
||||||
|
// information. Do not use this for
|
||||||
|
// anything other than to convey comment
|
||||||
|
// information to AsmPrinter.
|
||||||
|
|
||||||
std::vector<MachineOperand> Operands; // the operands
|
std::vector<MachineOperand> Operands; // the operands
|
||||||
mmo_iterator MemRefs; // information on memory references
|
mmo_iterator MemRefs; // information on memory references
|
||||||
mmo_iterator MemRefsEnd;
|
mmo_iterator MemRefsEnd;
|
||||||
@@ -107,6 +115,22 @@ public:
|
|||||||
const MachineBasicBlock* getParent() const { return Parent; }
|
const MachineBasicBlock* getParent() const { return Parent; }
|
||||||
MachineBasicBlock* getParent() { return Parent; }
|
MachineBasicBlock* getParent() { return Parent; }
|
||||||
|
|
||||||
|
/// getAsmPrinterFlags - Return the asm printer flags bitvector.
|
||||||
|
///
|
||||||
|
unsigned short getAsmPrinterFlags() const { return AsmPrinterFlags; }
|
||||||
|
|
||||||
|
/// getAsmPrinterFlag - Return whether an AsmPrinter flag is set.
|
||||||
|
///
|
||||||
|
bool getAsmPrinterFlag(AsmPrinter::CommentFlag Flag) const {
|
||||||
|
return AsmPrinterFlags & Flag;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// setAsmPrinterFlag - Set a flag for the AsmPrinter.
|
||||||
|
///
|
||||||
|
void setAsmPrinterFlag(unsigned short Flag) {
|
||||||
|
AsmPrinterFlags |= Flag;
|
||||||
|
}
|
||||||
|
|
||||||
/// getDebugLoc - Returns the debug location id of this MachineInstr.
|
/// getDebugLoc - Returns the debug location id of this MachineInstr.
|
||||||
///
|
///
|
||||||
DebugLoc getDebugLoc() const { return debugLoc; }
|
DebugLoc getDebugLoc() const { return debugLoc; }
|
||||||
|
Reference in New Issue
Block a user