Currently llvm-symbolizer doesn't allow flags combining. This patch allows such grouping behavior just like addr2line. Motivation: https://bugs.llvm.org/show_bug.cgi?id=40304
Details
Diff Detail
- Repository
- rL LLVM
- Build Status
Buildable 27187 Build 27186: arc lint + arc unit
Event Timeline
The code change looks fine. Please make sure, if you haven't already, to review all tests using llvm-symbolizer (they exist both in tools/llvm-symbolizer and DebugInfo) that currently use single dash options (for long options) to make sure they aren't negatively impacted. Adding grouping behaviour can cause a change in behaviour for these cases, if you're not careful.
test/tools/llvm-symbolizer/sym.test | ||
---|---|---|
25 ↗ | (On Diff #182887) | Rather than extending an existing test, I'd prefer it if this was done in its own test, as it isn't necessarily clear that this is specifically testing the combining of short options. |
Move test to separate file.
llvm/test/tools/llvm-symbolizer/ and llvm/test/DebugInfo/llvm-symbolizer* pass successfully.
LGTM, with one nit.
test/tools/llvm-symbolizer/flag-grouping.test | ||
---|---|---|
8 | Please add a new line at the end of the file. |
test/tools/llvm-symbolizer/flag-grouping.test | ||
---|---|---|
5 | Oops, I didn't look closely enough at the test. The start of the check here is unnecessarily complicated. It can just be: CHECK: 0x40054d: inctwo etc. |
Oops, I didn't look closely enough at the test. The start of the check here is unnecessarily complicated. It can just be:
CHECK: 0x40054d: inctwo etc.