Helper to count the number of functions in the module. Remove if there turns out to be a more direct way to do this.
| 25 | // Helper to count the number of functions in the module. |
| 26 | // Remove if there turns out to be a more direct way to do this. |
| 27 | uint32_t count_functions(opt::IRContext* context) { |
| 28 | uint32_t result = 0; |
| 29 | for (auto& function : *context->module()) { |
| 30 | (void)(function); |
| 31 | ++result; |
| 32 | } |
| 33 | return result; |
| 34 | } |
| 35 | |
| 36 | TEST(RemoveFunctionTest, BasicCheck) { |
| 37 | std::string shader = R"( |