| 72 | // Encodes a string as a sequence of words, using the SPIR-V encoding. |
| 73 | template <class VectorType = std::vector<uint32_t>> |
| 74 | inline VectorType MakeVector(const std::string& input) { |
| 75 | static_assert(std::is_same<uint32_t, typename VectorType::value_type>::value); |
| 76 | VectorType result; |
| 77 | AppendToVector(input, &result); |
| 78 | return result; |
| 79 | } |
| 80 | |
| 81 | // Decode a string from a sequence of words between first and last, using the |
| 82 | // SPIR-V encoding. Assert that a terminating 0-byte was found (unless |