diff --git a/llvm/lib/Target/SPIRV/SPIRVEmitIntrinsics.cpp b/llvm/lib/Target/SPIRV/SPIRVEmitIntrinsics.cpp index 719abde3d7fa6..4f3cc9ada04cf 100644 --- a/llvm/lib/Target/SPIRV/SPIRVEmitIntrinsics.cpp +++ b/llvm/lib/Target/SPIRV/SPIRVEmitIntrinsics.cpp @@ -93,7 +93,7 @@ class SPIRVEmitIntrinsics void eraseTodoType(Value *Op) { auto It = TodoType.find(Op); if (It != TodoType.end() && It->second) { - TodoType[Op] = false; + It->second = false; --TodoTypeSz; } }