mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-28 09:31:03 +00:00
trailing whitespace cleanup
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116215 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
1a2cf3b4d9
commit
c4bd6fbf4b
@ -23,51 +23,51 @@
|
|||||||
namespace llvm {
|
namespace llvm {
|
||||||
class CodeGenInstruction;
|
class CodeGenInstruction;
|
||||||
class Record;
|
class Record;
|
||||||
|
|
||||||
struct AsmWriterOperand {
|
struct AsmWriterOperand {
|
||||||
enum OpType {
|
enum OpType {
|
||||||
// Output this text surrounded by quotes to the asm.
|
// Output this text surrounded by quotes to the asm.
|
||||||
isLiteralTextOperand,
|
isLiteralTextOperand,
|
||||||
// This is the name of a routine to call to print the operand.
|
// This is the name of a routine to call to print the operand.
|
||||||
isMachineInstrOperand,
|
isMachineInstrOperand,
|
||||||
// Output this text verbatim to the asm writer. It is code that
|
// Output this text verbatim to the asm writer. It is code that
|
||||||
// will output some text to the asm.
|
// will output some text to the asm.
|
||||||
isLiteralStatementOperand
|
isLiteralStatementOperand
|
||||||
} OperandType;
|
} OperandType;
|
||||||
|
|
||||||
/// Str - For isLiteralTextOperand, this IS the literal text. For
|
/// Str - For isLiteralTextOperand, this IS the literal text. For
|
||||||
/// isMachineInstrOperand, this is the PrinterMethodName for the operand..
|
/// isMachineInstrOperand, this is the PrinterMethodName for the operand..
|
||||||
/// For isLiteralStatementOperand, this is the code to insert verbatim
|
/// For isLiteralStatementOperand, this is the code to insert verbatim
|
||||||
/// into the asm writer.
|
/// into the asm writer.
|
||||||
std::string Str;
|
std::string Str;
|
||||||
|
|
||||||
/// CGIOpNo - For isMachineInstrOperand, this is the index of the operand in
|
/// CGIOpNo - For isMachineInstrOperand, this is the index of the operand in
|
||||||
/// the CodeGenInstruction.
|
/// the CodeGenInstruction.
|
||||||
unsigned CGIOpNo;
|
unsigned CGIOpNo;
|
||||||
|
|
||||||
/// MiOpNo - For isMachineInstrOperand, this is the operand number of the
|
/// MiOpNo - For isMachineInstrOperand, this is the operand number of the
|
||||||
/// machine instruction.
|
/// machine instruction.
|
||||||
unsigned MIOpNo;
|
unsigned MIOpNo;
|
||||||
|
|
||||||
/// MiModifier - For isMachineInstrOperand, this is the modifier string for
|
/// MiModifier - For isMachineInstrOperand, this is the modifier string for
|
||||||
/// an operand, specified with syntax like ${opname:modifier}.
|
/// an operand, specified with syntax like ${opname:modifier}.
|
||||||
std::string MiModifier;
|
std::string MiModifier;
|
||||||
|
|
||||||
// To make VS STL happy
|
// To make VS STL happy
|
||||||
AsmWriterOperand(OpType op = isLiteralTextOperand):OperandType(op) {}
|
AsmWriterOperand(OpType op = isLiteralTextOperand):OperandType(op) {}
|
||||||
|
|
||||||
AsmWriterOperand(const std::string &LitStr,
|
AsmWriterOperand(const std::string &LitStr,
|
||||||
OpType op = isLiteralTextOperand)
|
OpType op = isLiteralTextOperand)
|
||||||
: OperandType(op), Str(LitStr) {}
|
: OperandType(op), Str(LitStr) {}
|
||||||
|
|
||||||
AsmWriterOperand(const std::string &Printer,
|
AsmWriterOperand(const std::string &Printer,
|
||||||
unsigned _CGIOpNo,
|
unsigned _CGIOpNo,
|
||||||
unsigned _MIOpNo,
|
unsigned _MIOpNo,
|
||||||
const std::string &Modifier,
|
const std::string &Modifier,
|
||||||
OpType op = isMachineInstrOperand)
|
OpType op = isMachineInstrOperand)
|
||||||
: OperandType(op), Str(Printer), CGIOpNo(_CGIOpNo), MIOpNo(_MIOpNo),
|
: OperandType(op), Str(Printer), CGIOpNo(_CGIOpNo), MIOpNo(_MIOpNo),
|
||||||
MiModifier(Modifier) {}
|
MiModifier(Modifier) {}
|
||||||
|
|
||||||
bool operator!=(const AsmWriterOperand &Other) const {
|
bool operator!=(const AsmWriterOperand &Other) const {
|
||||||
if (OperandType != Other.OperandType || Str != Other.Str) return true;
|
if (OperandType != Other.OperandType || Str != Other.Str) return true;
|
||||||
if (OperandType == isMachineInstrOperand)
|
if (OperandType == isMachineInstrOperand)
|
||||||
@ -77,26 +77,26 @@ namespace llvm {
|
|||||||
bool operator==(const AsmWriterOperand &Other) const {
|
bool operator==(const AsmWriterOperand &Other) const {
|
||||||
return !operator!=(Other);
|
return !operator!=(Other);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// getCode - Return the code that prints this operand.
|
/// getCode - Return the code that prints this operand.
|
||||||
std::string getCode() const;
|
std::string getCode() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
class AsmWriterInst {
|
class AsmWriterInst {
|
||||||
public:
|
public:
|
||||||
std::vector<AsmWriterOperand> Operands;
|
std::vector<AsmWriterOperand> Operands;
|
||||||
const CodeGenInstruction *CGI;
|
const CodeGenInstruction *CGI;
|
||||||
|
|
||||||
AsmWriterInst(const CodeGenInstruction &CGI,
|
AsmWriterInst(const CodeGenInstruction &CGI,
|
||||||
unsigned Variant,
|
unsigned Variant,
|
||||||
int FirstOperandColumn,
|
int FirstOperandColumn,
|
||||||
int OperandSpacing);
|
int OperandSpacing);
|
||||||
|
|
||||||
/// MatchesAllButOneOp - If this instruction is exactly identical to the
|
/// MatchesAllButOneOp - If this instruction is exactly identical to the
|
||||||
/// specified instruction except for one differing operand, return the
|
/// specified instruction except for one differing operand, return the
|
||||||
/// differing operand number. Otherwise return ~0.
|
/// differing operand number. Otherwise return ~0.
|
||||||
unsigned MatchesAllButOneOp(const AsmWriterInst &Other) const;
|
unsigned MatchesAllButOneOp(const AsmWriterInst &Other) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void AddLiteralString(const std::string &Str) {
|
void AddLiteralString(const std::string &Str) {
|
||||||
// If the last operand was already a literal text string, append this to
|
// If the last operand was already a literal text string, append this to
|
||||||
|
Loading…
x
Reference in New Issue
Block a user