[llvm] [NFC] clang-format utils/TableGen (PR #80973)
Pierre van Houtryve via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 7 23:51:39 PST 2024
================
@@ -57,54 +57,55 @@ AsmWriterInst::AsmWriterInst(const CodeGenInstruction &CGI, unsigned CGIIndex,
std::string::size_type LastEmitted = 0;
while (LastEmitted != AsmString.size()) {
std::string::size_type DollarPos =
- AsmString.find_first_of("$\\", LastEmitted);
- if (DollarPos == std::string::npos) DollarPos = AsmString.size();
+ AsmString.find_first_of("$\\", LastEmitted);
+ if (DollarPos == std::string::npos)
+ DollarPos = AsmString.size();
// Emit a constant string fragment.
if (DollarPos != LastEmitted) {
for (; LastEmitted != DollarPos; ++LastEmitted)
switch (AsmString[LastEmitted]) {
- case '\n':
- AddLiteralString("\\n");
- break;
- case '\t':
- AddLiteralString("\\t");
- break;
- case '"':
- AddLiteralString("\\\"");
- break;
- case '\\':
- AddLiteralString("\\\\");
- break;
- default:
- AddLiteralString(std::string(1, AsmString[LastEmitted]));
- break;
+ case '\n':
----------------
Pierre-vh wrote:
idem
https://github.com/llvm/llvm-project/pull/80973
More information about the llvm-commits
mailing list