- case '\n':
- assert(!InGroup() && "Missing matching group delimeter");
- ReadingWhitespace = false;
- AddLiteralString("\\n");
- break;
- case '\t':
- if (!InGroup()) {
- ReadingWhitespace = true;
- }
- AddLiteralString("\\t");
- break;
- case '"':
- if (InWhitespace() && !InGroup())
- Operands.push_back(
- AsmWriterOperand(
- "O.PadToColumn(TAI->getOperandColumn(OperandColumn++));\n",
- AsmWriterOperand::isLiteralStatementOperand));
- ReadingWhitespace = false;
- AddLiteralString("\\\"");
- break;
- case '\\':
- if (InWhitespace() && !InGroup())
- Operands.push_back(
- AsmWriterOperand(
- "O.PadToColumn(TAI->getOperandColumn(OperandColumn++));\n",
- AsmWriterOperand::isLiteralStatementOperand));
- ReadingWhitespace = false;
- AddLiteralString("\\\\");
- break;
-
- case '(': // Fallthrough
- case '[':
- if (InWhitespace() && !InGroup())
- Operands.push_back(
- AsmWriterOperand(
- "O.PadToColumn(TAI->getOperandColumn(OperandColumn++));\n",
- AsmWriterOperand::isLiteralStatementOperand));
- ReadingWhitespace = false;
-
- ++GroupLevel;
- assert(GroupLevel < MAX_GROUP_NESTING_LEVEL
- && "Exceeded maximum operand group nesting level");
- GroupDelim[GroupLevel] = AsmString[LastEmitted];
- AddLiteralString(std::string(1, AsmString[LastEmitted]));
- break;
-
- case ')': // Fallthrough
- case ']':
- if (InWhitespace() && !InGroup())
- Operands.push_back(
- AsmWriterOperand(
- "O.PadToColumn(TAI->getOperandColumn(OperandColumn++));\n",
- AsmWriterOperand::isLiteralStatementOperand));
- ReadingWhitespace = false;
-
- if (AsmString[LastEmitted] == ')')
- assert(GroupDelim[GroupLevel] == '(' && "Mismatched delimeters");
- else
- assert(GroupDelim[GroupLevel] == '[' && "Mismatched delimeters");
-
- --GroupLevel;
- assert(GroupLevel > -2 && "Too many end delimeters!");
- AddLiteralString(std::string(1, AsmString[LastEmitted]));
- break;
-