<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/138390>138390</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            llvm assembler does not emit the correct symbol names when escaped characters are present
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          midnightveil
      </td>
    </tr>
</table>

<pre>
    ## assembler

https://godbolt.org/z/ac1vev5nh

```asm
.type   "hello \" world", @object
"hello \" world":
    .zero       1
```

In GCC's as:

```
Symbol table '.symtab' contains 2 entries:
   Num:    Value Size Type    Bind   Vis      Ndx Name
     0: 0000000000000000     0 NOTYPE  LOCAL  DEFAULT  UND 
     1: 0000000000000000     0 OBJECT  LOCAL DEFAULT    1 hello " world
```

In Clang's as:

```
Symbol table '.symtab' contains 2 entries:
   Num:    Value          Size Type    Bind Vis      Ndx Name
     0: 0000000000000000     0 NOTYPE  LOCAL  DEFAULT  UND 
     1: 0000000000000000     0 OBJECT  LOCAL  DEFAULT    2 hello \" world
```

## c frontend

This then seems to make `-save-temps` have different output to without it:

https://godbolt.org/z/4sa7e5dq4

`clang -save-temps main.c -o clang.o` gives:

```
Symbol table '.symtab' contains 10 entries:
   Num:    Value          Size Type    Bind   Vis      Ndx Name
...
     4: 0000000000403000     4 OBJECT  GLOBAL DEFAULT    4 hello \" world
...
```

Without `-save-temps`:

```
Symbol table '.symtab' contains 10 entries:
   Num:    Value          Size Type    Bind   Vis Ndx Name
...
     7: 0000000000403000     4 OBJECT  GLOBAL DEFAULT    4 hello " world
...
```

</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJzMlc9u4zYQxp-GugwsUKRkxQcdHCdetAicAutt0SNFji22_OOSlFPn6QtZtjfruFugi6JLCBBAzschvx8HI2LUW4fYkOqeVA-Z6FPnQ2O1cnrbpT1qk7VeHRrCOGEcRIxoW4OB0Dmh8y6lXSR8TtiSsOXWq9ablPuwJWz5SthSyGKP-8p1YziZ0vET0RI6z9Nhh4TOCGMdGuOBVAvCGLz4YBRhjLAFkJL69jeUaZD_XRwfNgcAyF8xeEJnxdtkY-4fHHxYLAirI4g4Kq6CPh5s6w0k0RoEwuo8HmwSLWE1SO-S0C4CA3QpaIyXnKveEn5M_rMwPcJH_YqwPuxwmLrXTg0rOsJxrNSfsBIWT8cFOkjp1RhXYPW8_vWnR4Cn58X8CeDhcTn_9LQG-LR6gLO--Ir--f7Hx8X6rL_IAQo4uXix8JZZCyPc9r-36zLe-_YduPbWNgY3Ht875051ImETvEvo1Di97nSE1KGDiGgjJA9W_I5ApnQSxR4nCe0ukimFTuwRlN5sMKBL4Pu069MQ_6JT5_sEOl1w_FP5lVHUWKk_ygs9OVCFNynBCu1yCRMPx7XcD4fY6j3-e-oF_Rbst8slz_MzvvJLfCXlZ3zlBd-Hp-f7L199eRvfuO8VxF9OVr-j879actuN-tvc-KoVmWq4mvGZyLAp6nLKppxznnUNw0KiLMSdkpJyJjeKTacz2W6qmtcFrzLdMMoqWlFOZ_SuYnnLBVfToq5LXosSa1JStEKb3Ji9HZ5spmPssSn4HZ_RzIgWTTx3pdAMUZO230ZSUqNjip91SSeDx4DP3QmUxwjOJ0Cr01B4IH0IKBPEkZYTFiO8DBWJUYodKpCdCEImDBFEQNgFjOhS1gfTXBWaTl3f5tJbwpZD4tNvsgv-2KrY8niZSNjydJ99w_4KAAD__4odEu4">