diff options
author | Craig Topper <craig.topper@gmail.com> | 2016-01-14 06:15:07 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@gmail.com> | 2016-01-14 06:15:07 +0000 |
commit | c24a40106e1336c625bd6879e2d3a1b94ed33d89 (patch) | |
tree | 1d7a1ef6149115cc2ecb884ef17a2d614eab167b /llvm/utils/TableGen/AsmWriterInst.h | |
parent | e21e90933c6e879c232403904e5d834c786d76af (diff) | |
download | bcm5719-llvm-c24a40106e1336c625bd6879e2d3a1b94ed33d89.tar.gz bcm5719-llvm-c24a40106e1336c625bd6879e2d3a1b94ed33d89.zip |
[TableGen] Pass PassSubtarget flag into getCode instead of storing a copy of the flag in every AsmWriterOperand. NFC
llvm-svn: 257743
Diffstat (limited to 'llvm/utils/TableGen/AsmWriterInst.h')
-rw-r--r-- | llvm/utils/TableGen/AsmWriterInst.h | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/llvm/utils/TableGen/AsmWriterInst.h b/llvm/utils/TableGen/AsmWriterInst.h index a597e6ba1a5..3448ac14af7 100644 --- a/llvm/utils/TableGen/AsmWriterInst.h +++ b/llvm/utils/TableGen/AsmWriterInst.h @@ -53,11 +53,6 @@ namespace llvm { /// an operand, specified with syntax like ${opname:modifier}. std::string MiModifier; - // PassSubtarget - Pass MCSubtargetInfo to the print method if this is - // equal to 1. - // FIXME: Remove after all ports are updated. - unsigned PassSubtarget; - // To make VS STL happy AsmWriterOperand(OpType op = isLiteralTextOperand):OperandType(op) {} @@ -69,10 +64,9 @@ namespace llvm { unsigned _CGIOpNo, unsigned _MIOpNo, const std::string &Modifier, - unsigned PassSubtarget, OpType op = isMachineInstrOperand) : OperandType(op), Str(Printer), CGIOpNo(_CGIOpNo), MIOpNo(_MIOpNo), - MiModifier(Modifier), PassSubtarget(PassSubtarget) {} + MiModifier(Modifier) {} bool operator!=(const AsmWriterOperand &Other) const { if (OperandType != Other.OperandType || Str != Other.Str) return true; @@ -85,7 +79,7 @@ namespace llvm { } /// getCode - Return the code that prints this operand. - std::string getCode() const; + std::string getCode(bool PassSubtarget) const; }; class AsmWriterInst { @@ -93,8 +87,7 @@ namespace llvm { std::vector<AsmWriterOperand> Operands; const CodeGenInstruction *CGI; - AsmWriterInst(const CodeGenInstruction &CGI, - unsigned Variant, unsigned PassSubtarget); + AsmWriterInst(const CodeGenInstruction &CGI, unsigned Variant); /// MatchesAllButOneOp - If this instruction is exactly identical to the /// specified instruction except for one differing operand, return the |