Commit 815055b
authored
[flag] Update the lifetime markers flag to correctly handle multiple instances (#5283)
The current behavior of the lifetime markers flags is to allow the
`-disable-lifetime-markers` flag to override the enable flag no matter
where it occurs. This means that if you write
dxc -disable-lifetime-markers ... -enable-lifetime-markers
the lifetime markers will be disabled. This works differently from most
clang flags which allow the last version of the enable/disable flag to win.
This PR modifies these flags so that when there are multiple occurences of
enable/disable the last one will win. It is not clear if the original behavior
was intentional or just a mis-understanding of the flag API. There were no
tests enforcing the original behavior.1 parent 7c77439 commit 815055b
2 files changed
Lines changed: 39 additions & 3 deletions
File tree
- lib/DxcSupport
- tools/clang/test/HLSLFileCheck/hlsl/lifetimes
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
779 | 779 | | |
780 | 780 | | |
781 | 781 | | |
782 | | - | |
783 | | - | |
784 | | - | |
| 782 | + | |
| 783 | + | |
785 | 784 | | |
786 | 785 | | |
787 | 786 | | |
| |||
Lines changed: 37 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
0 commit comments