[all-commits] [llvm/llvm-project] 8893d4: MC: Support quoted symbol names

Fangrui Song via All-commits all-commits at lists.llvm.org
Fri May 9 19:00:39 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 8893d407a68ece98d6911e3f186305dbc43ee90e
      https://github.com/llvm/llvm-project/commit/8893d407a68ece98d6911e3f186305dbc43ee90e
  Author: Fangrui Song <i at maskray.me>
  Date:   2025-05-09 (Fri, 09 May 2025)

  Changed paths:
    M bolt/test/runtime/X86/fdata-escape-chars.ll
    M llvm/lib/MC/MCContext.cpp
    M llvm/lib/MC/MCSymbol.cpp
    M llvm/test/MC/AsmParser/quoted.s
    M llvm/test/MC/COFF/safeseh.s
    M llvm/test/MC/ELF/symbol-names.s

  Log Message:
  -----------
  MC: Support quoted symbol names

gas has supported " quoted symbols since 2015.
Both \ and " need to be escaped.
https://sourceware.org/pipermail/binutils/2015-August/090003.html

We don't unescape \\ or \" in assembly strings, leading to clang -c
--save-temps vs clang -c difference for the following C code:

```
int x asm("a\"\\b");
```

Fix #138390

MC/COFF/safeseh.h looks incorrect. \01 in `.safeseh "\01foo"` is not a
correct escape sequence. Change it to \\

Pull Request: https://github.com/llvm/llvm-project/pull/138817



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list