-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[Clang][Driver] Skip empty strings in getAArch64MultilibFlags #97827
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// RUN: %clang --target=aarch64-none-elf -march=armv8.9-a+rcpc3 -print-multi-flags-experimental -c %s 2>&1 | FileCheck %s | ||
|
||
// The purpose of this regression test is to make sure that when | ||
// compile options are converted into multilib selection flags, no | ||
// empty strings are accidentally included in the | ||
// -march=armv8.9-a+foo+bar+baz string, leading to two consecutive + | ||
// signs. With +rcpc3 in the input, this used to generate an empty | ||
// string for the anonymous architecture extension corresponding to | ||
// the SubtargetFeature 'rcpc-immo', which is a dependency of rcpc3 | ||
// but has no separate extension name for use on command lines. So we | ||
// check that the two named rcpc options appear, and that no ++ | ||
// appears before or after. | ||
|
||
// CHECK: -march=armv8.9-a | ||
// CHECK-NOT: ++ | ||
// CHECK-SAME: +rcpc+rcpc3+ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm wondering if a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done. I wasn't sure whether it would need to come before or after the |
||
// CHECK-NOT: ++ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it could be worth a comment here explaining what the test is checking for as it would likely need git blame to work it out otherwise. For example: