From 93a38d60be274159aafe32440d768dcd0e9cd2df Mon Sep 17 00:00:00 2001 From: Alexey Bataev Date: Tue, 16 Oct 2018 00:09:06 +0000 Subject: [OPENMP][NVPTX]Increment iterator only when it is used, NFC. llvm-svn: 344574 --- clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp') diff --git a/clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp b/clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp index 4d5a580bd67..2aa8e83c2c0 100644 --- a/clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp +++ b/clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp @@ -2138,7 +2138,8 @@ void CGOpenMPRuntimeNVPTX::emitGenericVarsProlog(CodeGenFunction &CGF, CGF.EmitStoreOfScalar(ParValue, VarAddr); I->getSecond().MappedParams->setVarAddr(CGF, VD, VarAddr.getAddress()); } - ++SecIt; + if (IsTTD) + ++SecIt; } } for (const ValueDecl *VD : I->getSecond().EscapedVariableLengthDecls) { -- cgit v1.2.3