| 38 | } |
| 39 | |
| 40 | FriendlyNameMapper::FriendlyNameMapper(const spv_const_context context, |
| 41 | const uint32_t* code, |
| 42 | const size_t wordCount, uint32_t options) |
| 43 | : grammar_(AssemblyGrammar(context)) { |
| 44 | spv_diagnostic diag = nullptr; |
| 45 | // We don't care if the parse fails. |
| 46 | spvBinaryParseWithOptions(context, this, code, wordCount, nullptr, |
| 47 | ParseInstructionForwarder, &diag, options); |
| 48 | spvDiagnosticDestroy(diag); |
| 49 | } |
| 50 | |
| 51 | std::string FriendlyNameMapper::NameForId(uint32_t id) { |
| 52 | auto iter = name_for_id_.find(id); |
nothing calls this directly
no test coverage detected