Lines Matching refs:textValue
51 bool spvIsValidID(const char* textValue) { in spvIsValidID() argument
52 const char* c = textValue; in spvIsValidID()
59 return c != textValue; in spvIsValidID()
64 spv_result_t spvTextToLiteral(const char* textValue, spv_literal_t* pLiteral) { in spvTextToLiteral() argument
69 const size_t len = strlen(textValue); in spvTextToLiteral()
73 switch (textValue[index]) { in spvTextToLiteral()
105 if (len < 2 || textValue[0] != '"' || textValue[len - 1] != '"') in spvTextToLiteral()
108 for (const char* val = textValue + 1; val != textValue + len - 1; ++val) { in spvTextToLiteral()
122 double d = std::strtod(textValue, nullptr); in spvTextToLiteral()
132 int64_t i64 = strtoll(textValue, nullptr, 10); in spvTextToLiteral()
142 uint64_t u64 = strtoull(textValue, nullptr, 10); in spvTextToLiteral()
190 const char* textValue, in spvTextEncodeOperand() argument
194 if ('!' == textValue[0]) { in spvTextEncodeOperand()
195 if (auto error = encodeImmediate(context, textValue, pInst)) { in spvTextEncodeOperand()
216 if ('%' == textValue[0]) { in spvTextEncodeOperand()
217 textValue++; in spvTextEncodeOperand()
221 if (!spvIsValidID(textValue)) { in spvTextEncodeOperand()
222 return context->diagnostic() << "Invalid ID " << textValue; in spvTextEncodeOperand()
224 const uint32_t id = context->spvNamedIdAssignOrGet(textValue); in spvTextEncodeOperand()
245 if (grammar.lookupExtInst(pInst->extInstType, textValue, &extInst) == in spvTextEncodeOperand()
257 << "Invalid extended instruction name '" << textValue << "'."; in spvTextEncodeOperand()
263 if (spvTextToLiteral(textValue, &extInstValue) || in spvTextEncodeOperand()
267 << textValue << "' to unsigned integer."; in spvTextEncodeOperand()
283 if (grammar.lookupSpecConstantOpcode(textValue, &opcode)) { in spvTextEncodeOperand()
285 << " '" << textValue << "'."; in spvTextEncodeOperand()
309 textValue, error_code_for_literals, expected_type, pInst)) { in spvTextEncodeOperand()
318 textValue, error_code_for_literals, spvtools::kUnknownType, in spvTextEncodeOperand()
357 textValue, error_code_for_literals, expected_type, pInst)) { in spvTextEncodeOperand()
365 spv_result_t error = spvTextToLiteral(textValue, &literal); in spvTextEncodeOperand()
369 << "Invalid literal string '" << textValue << "'."; in spvTextEncodeOperand()
373 << "Expected literal string, found literal number '" << textValue in spvTextEncodeOperand()
406 if (grammar.parseMaskOperand(type, textValue, &value)) { in spvTextEncodeOperand()
408 << " operand '" << textValue << "'."; in spvTextEncodeOperand()
416 grammar, context, SPV_OPERAND_TYPE_OPTIONAL_LITERAL_NUMBER, textValue, in spvTextEncodeOperand()
422 textValue, pInst, pExpectedOperands); in spvTextEncodeOperand()
428 textValue, pInst, pExpectedOperands); in spvTextEncodeOperand()
432 << "Invalid word following !<integer>: " << textValue; in spvTextEncodeOperand()
442 if (grammar.lookupOperand(type, textValue, strlen(textValue), &entry)) { in spvTextEncodeOperand()
444 << " '" << textValue << "'."; in spvTextEncodeOperand()
448 << " '" << textValue << "'."; in spvTextEncodeOperand()