mirror of
https://github.com/intel/llvm.git
synced 2026-01-26 21:53:12 +08:00
[libc][NFC] Use a end of list marker for cpu feature detection.
Without this, the array can end up being an empty array leading to compiler failures.
This commit is contained in:
@@ -18,6 +18,9 @@
|
||||
int main(int, char **) {
|
||||
const char *strings[] = {
|
||||
@DEFINITIONS@
|
||||
// If DEFINITIONS turns out to be empty, we don't want to list
|
||||
// an empty array. So, we add an end of list marker.
|
||||
"<end_of_feature_list>"
|
||||
};
|
||||
const size_t size = sizeof(strings) / sizeof(strings[0]);
|
||||
for (size_t i = 0; i < size; ++i) {
|
||||
|
||||
Reference in New Issue
Block a user