diff options
Diffstat (limited to 'clang/lib/CodeGen/CGStmtOpenMP.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGStmtOpenMP.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/clang/lib/CodeGen/CGStmtOpenMP.cpp b/clang/lib/CodeGen/CGStmtOpenMP.cpp index dec372066b8..d9b4fa83a93 100644 --- a/clang/lib/CodeGen/CGStmtOpenMP.cpp +++ b/clang/lib/CodeGen/CGStmtOpenMP.cpp @@ -128,11 +128,9 @@ class OMPLoopScope : public CodeGenFunction::RunCleanupsScope { }); } (void)PreCondScope.Privatize(); - if (auto *LD = dyn_cast<OMPLoopDirective>(&S)) { - if (auto *PreInits = cast_or_null<DeclStmt>(LD->getPreInits())) { - for (const auto *I : PreInits->decls()) - CGF.EmitVarDecl(cast<VarDecl>(*I)); - } + if (auto *PreInits = cast_or_null<DeclStmt>(S.getPreInits())) { + for (const auto *I : PreInits->decls()) + CGF.EmitVarDecl(cast<VarDecl>(*I)); } } |