diff options
author | Chris Lattner <sabre@nondot.org> | 2010-02-10 01:23:18 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-02-10 01:23:18 +0000 |
commit | 45282aedb9c5a33d20565502c6c8fc871fa84cbe (patch) | |
tree | 50eb2a6455fe7613b313398f6257aed6e4e14370 /include/llvm/CodeGen/MachineInstr.h | |
parent | 1e5cc222e85fdfdec34e977977c9ca0dea83aa04 (diff) |
fix a layering violation: VirtRegRewriter.cpp shouldn't use AsmPrinter.h.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95748 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/MachineInstr.h')
-rw-r--r-- | include/llvm/CodeGen/MachineInstr.h | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/include/llvm/CodeGen/MachineInstr.h b/include/llvm/CodeGen/MachineInstr.h index 51abcc2169..1b2de76006 100644 --- a/include/llvm/CodeGen/MachineInstr.h +++ b/include/llvm/CodeGen/MachineInstr.h @@ -41,6 +41,14 @@ class MachineInstr : public ilist_node<MachineInstr> { public: typedef MachineMemOperand **mmo_iterator; + /// Flags to specify different kinds of comments to output in + /// assembly code. These flags carry semantic information not + /// otherwise easily derivable from the IR text. + /// + enum CommentFlag { + ReloadReuse = 0x1 + }; + private: const TargetInstrDesc *TID; // Instruction descriptor. unsigned short NumImplicitOps; // Number of implicit operands (which @@ -121,14 +129,14 @@ public: /// getAsmPrinterFlag - Return whether an AsmPrinter flag is set. /// - bool getAsmPrinterFlag(unsigned Flag) const { + bool getAsmPrinterFlag(CommentFlag Flag) const { return AsmPrinterFlags & Flag; } /// setAsmPrinterFlag - Set a flag for the AsmPrinter. /// - void setAsmPrinterFlag(unsigned short Flag) { - AsmPrinterFlags |= Flag; + void setAsmPrinterFlag(CommentFlag Flag) { + AsmPrinterFlags |= (unsigned short)Flag; } /// getDebugLoc - Returns the debug location id of this MachineInstr. |