Avoid uninit warning in GCC (#3044)

This commit is contained in:
David Neto 2019-11-13 17:15:11 -05:00 committed by GitHub
parent cdd6829a3e
commit 3da910d55f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -51,7 +51,7 @@ protobufs::IdUseDescriptor MakeIdUseDescriptor(
protobufs::IdUseDescriptor MakeIdUseDescriptorFromUse(
opt::IRContext* context, opt::Instruction* inst,
uint32_t in_operand_index) {
auto in_operand = inst->GetInOperand(in_operand_index);
const auto& in_operand = inst->GetInOperand(in_operand_index);
assert(in_operand.type == SPV_OPERAND_TYPE_ID);
return MakeIdUseDescriptor(in_operand.words[0],
MakeInstructionDescriptor(context, inst),