| 99 | bool IsSpace(char c) { return isspace(c) || c == ',' || c == '\0'; } |
| 100 | |
| 101 | bool IsHexStream(const std::vector<char>& stream) { |
| 102 | for (char c : stream) { |
| 103 | if (IsSpace(c)) { |
| 104 | continue; |
| 105 | } |
| 106 | |
| 107 | // Every possible case of a SPIR-V hex stream starts with either '0' or 'x' |
| 108 | // (see |HexMode| values). Make a decision upon inspecting the first |
| 109 | // non-space character. |
| 110 | return c == '0' || c == 'x' || c == 'X'; |
| 111 | } |
| 112 | |
| 113 | return false; |
| 114 | } |
| 115 | |
| 116 | bool MatchIgnoreCase(const char* token, const char* expect, size_t len) { |
| 117 | for (size_t i = 0; i < len; ++i) { |
no test coverage detected