| 71 | } |
| 72 | |
| 73 | bool is_assembly(const char* path) { |
| 74 | const char* suffix = strrchr(path, '.'); |
| 75 | if (suffix == nullptr) { |
| 76 | return false; |
| 77 | } |
| 78 | |
| 79 | return strcmp(suffix, ".spvasm") == 0; |
| 80 | } |
| 81 | |
| 82 | std::unique_ptr<spvtools::opt::IRContext> load_module(const char* path) { |
| 83 | if (is_assembly(path)) { |