[llvm-bugs] [Bug 48781] New: AsmLexer doesn't understand some escapes (notably '\r' and '\f')

via llvm-bugs llvm-bugs at lists.llvm.org
Sun Jan 17 11:45:57 PST 2021


https://bugs.llvm.org/show_bug.cgi?id=48781

            Bug ID: 48781
           Summary: AsmLexer doesn't understand some escapes (notably '\r'
                    and '\f')
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: MC
          Assignee: unassignedbugs at nondot.org
          Reporter: theferdi265 at gmail.com
                CC: llvm-bugs at lists.llvm.org

llvm-mc, or also the integrated assembler in clang (which uses the same
parser), doesn't understand the escapes '\r' and '\f'.

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 seemlingly 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.

The relevant code block lives in `./llvm/lib/MC/MCParser/AsmLexer.cpp:566`.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210117/d5bd8854/attachment.html>


More information about the llvm-bugs mailing list