This patch fixes Bug 48781.
llvm-mc, or also the integrated assembler in clang (which uses the same parser), doesn't understand the escapes '\r' and '\f'. This patch fixes that.
Reproducer: llvm-mc <(echo ".byte '\\r'")
Expected: .text .byte 13
Actual: .text .byte 114
After Bug 8615, support was added for basic character escapes, but '\r' and '\f' were seemingly forgotten.
By adding those two escapes to llvm-mc, LLVM would achieve feature parity with GNU as for character constants as described by the info as manual.
clang-format: please reformat the code