| 423 | } |
| 424 | |
| 425 | uint32_t GetArraySize(const opt::Instruction& array_type_instruction, |
| 426 | opt::IRContext* context) { |
| 427 | auto array_length_constant = |
| 428 | context->get_constant_mgr() |
| 429 | ->GetConstantFromInst(context->get_def_use_mgr()->GetDef( |
| 430 | array_type_instruction.GetSingleWordInOperand(1))) |
| 431 | ->AsIntConstant(); |
| 432 | if (array_length_constant->words().size() != 1) { |
| 433 | return 0; |
| 434 | } |
| 435 | return array_length_constant->GetU32(); |
| 436 | } |
| 437 | |
| 438 | uint32_t GetBoundForCompositeIndex(const opt::Instruction& composite_type_inst, |
| 439 | opt::IRContext* ir_context) { |
no test coverage detected