[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:
Siva Chandra Reddy
2021-01-27 01:18:58 -08:00
parent 498c4b6fc4
commit 7cd420649f

View File

@@ -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) {