| 88 | } |
| 89 | |
| 90 | const char* spvOpcodeString(const uint32_t opcode) { |
| 91 | const spvtools::InstructionDesc* desc = nullptr; |
| 92 | if (SPV_SUCCESS != |
| 93 | spvtools::LookupOpcode(static_cast<spv::Op>(opcode), &desc)) { |
| 94 | assert(0 && "Unreachable!"); |
| 95 | return "unknown"; |
| 96 | } |
| 97 | return desc->name().data(); |
| 98 | } |
| 99 | |
| 100 | const char* spvOpcodeString(const spv::Op opcode) { |
| 101 | return spvOpcodeString(static_cast<uint32_t>(opcode)); |