[all-commits] [llvm/llvm-project] 1c5531: Treat `''` and `""` in Gnu-tokenized response file...

Tony Allevato via All-commits all-commits at lists.llvm.org
Wed Apr 1 06:57:38 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 1c55313f344ff2189500f87c89cec2a3cf2eb5c9
      https://github.com/llvm/llvm-project/commit/1c55313f344ff2189500f87c89cec2a3cf2eb5c9
  Author: Tony Allevato <tony.allevato at gmail.com>
  Date:   2026-04-01 (Wed, 01 Apr 2026)

  Changed paths:
    M llvm/lib/Support/CommandLine.cpp
    M llvm/unittests/Support/CommandLineTest.cpp

  Log Message:
  -----------
  Treat `''` and `""` in Gnu-tokenized response files as an empty string argument. (#187566)

This matches the behavior of gcc and also fixes an inconsistency with
the way the same arguments would be parsed by the shell. For example,
this command line passed directly on the shell:

`command -option1 '' -option2`

has three arguments: `"-option1"`, `""`, and `"-option2"`. However, if
these are passed in a Gnu-tokenized response file today:

```
-option1
''
-option2
```

The `''` is discarded and the command incorrectly has two arguments:
`"-option1"` and `"-option2"`.



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