diff options
Diffstat (limited to 'clang/lib/Sema/SemaOpenMP.cpp')
-rw-r--r-- | clang/lib/Sema/SemaOpenMP.cpp | 80 |
1 files changed, 40 insertions, 40 deletions
diff --git a/clang/lib/Sema/SemaOpenMP.cpp b/clang/lib/Sema/SemaOpenMP.cpp index be51787a377..d27f92660d7 100644 --- a/clang/lib/Sema/SemaOpenMP.cpp +++ b/clang/lib/Sema/SemaOpenMP.cpp @@ -3572,7 +3572,7 @@ StmtResult Sema::ActOnOpenMPParallelDirective(ArrayRef<OMPClause *> Clauses, // longjmp() and throw() must not violate the entry/exit criteria. CS->getCapturedDecl()->setNothrow(); - getCurFunction()->setHasBranchProtectedScope(); + setFunctionHasBranchProtectedScope(); return OMPParallelDirective::Create(Context, StartLoc, EndLoc, Clauses, AStmt, DSAStack->isCancelRegion()); @@ -5281,7 +5281,7 @@ StmtResult Sema::ActOnOpenMPSimdDirective( if (checkSimdlenSafelenSpecified(*this, Clauses)) return StmtError(); - getCurFunction()->setHasBranchProtectedScope(); + setFunctionHasBranchProtectedScope(); return OMPSimdDirective::Create(Context, StartLoc, EndLoc, NestedLoopCount, Clauses, AStmt, B); } @@ -5317,7 +5317,7 @@ StmtResult Sema::ActOnOpenMPForDirective( } } - getCurFunction()->setHasBranchProtectedScope(); + setFunctionHasBranchProtectedScope(); return OMPForDirective::Create(Context, StartLoc, EndLoc, NestedLoopCount, Clauses, AStmt, B, DSAStack->isCancelRegion()); } @@ -5357,7 +5357,7 @@ StmtResult Sema::ActOnOpenMPForSimdDirective( if (checkSimdlenSafelenSpecified(*this, Clauses)) return StmtError(); - getCurFunction()->setHasBranchProtectedScope(); + setFunctionHasBranchProtectedScope(); return OMPForSimdDirective::Create(Context, StartLoc, EndLoc, NestedLoopCount, Clauses, AStmt, B); } @@ -5394,7 +5394,7 @@ StmtResult Sema::ActOnOpenMPSectionsDirective(ArrayRef<OMPClause *> Clauses, return StmtError(); } - getCurFunction()->setHasBranchProtectedScope(); + setFunctionHasBranchProtectedScope(); return OMPSectionsDirective::Create(Context, StartLoc, EndLoc, Clauses, AStmt, DSAStack->isCancelRegion()); @@ -5408,7 +5408,7 @@ StmtResult Sema::ActOnOpenMPSectionDirective(Stmt *AStmt, assert(isa<CapturedStmt>(AStmt) && "Captured statement expected"); - getCurFunction()->setHasBranchProtectedScope(); + setFunctionHasBranchProtectedScope(); DSAStack->setParentCancelRegion(DSAStack->isCancelRegion()); return OMPSectionDirective::Create(Context, StartLoc, EndLoc, AStmt, @@ -5424,7 +5424,7 @@ StmtResult Sema::ActOnOpenMPSingleDirective(ArrayRef<OMPClause *> Clauses, assert(isa<CapturedStmt>(AStmt) && "Captured statement expected"); - getCurFunction()->setHasBranchProtectedScope(); + setFunctionHasBranchProtectedScope(); // OpenMP [2.7.3, single Construct, Restrictions] // The copyprivate clause must not be used with the nowait clause. @@ -5454,7 +5454,7 @@ StmtResult Sema::ActOnOpenMPMasterDirective(Stmt *AStmt, assert(isa<CapturedStmt>(AStmt) && "Captured statement expected"); - getCurFunction()->setHasBranchProtectedScope(); + setFunctionHasBranchProtectedScope(); return OMPMasterDirective::Create(Context, StartLoc, EndLoc, AStmt); } @@ -5508,7 +5508,7 @@ StmtResult Sema::ActOnOpenMPCriticalDirective( } } - getCurFunction()->setHasBranchProtectedScope(); + setFunctionHasBranchProtectedScope(); auto *Dir = OMPCriticalDirective::Create(Context, DirName, StartLoc, EndLoc, Clauses, AStmt); @@ -5556,7 +5556,7 @@ StmtResult Sema::ActOnOpenMPParallelForDirective( } } - getCurFunction()->setHasBranchProtectedScope(); + setFunctionHasBranchProtectedScope(); return OMPParallelForDirective::Create(Context, StartLoc, EndLoc, NestedLoopCount, Clauses, AStmt, B, DSAStack->isCancelRegion()); @@ -5601,7 +5601,7 @@ StmtResult Sema::ActOnOpenMPParallelForSimdDirective( if (checkSimdlenSafelenSpecified(*this, Clauses)) return StmtError(); - getCurFunction()->setHasBranchProtectedScope(); + setFunctionHasBranchProtectedScope(); return OMPParallelForSimdDirective::Create( Context, StartLoc, EndLoc, NestedLoopCount, Clauses, AStmt, B); } @@ -5639,7 +5639,7 @@ Sema::ActOnOpenMPParallelSectionsDirective(ArrayRef<OMPClause *> Clauses, return StmtError(); } - getCurFunction()->setHasBranchProtectedScope(); + setFunctionHasBranchProtectedScope(); return OMPParallelSectionsDirective::Create( Context, StartLoc, EndLoc, Clauses, AStmt, DSAStack->isCancelRegion()); @@ -5659,7 +5659,7 @@ StmtResult Sema::ActOnOpenMPTaskDirective(ArrayRef<OMPClause *> Clauses, // longjmp() and throw() must not violate the entry/exit criteria. CS->getCapturedDecl()->setNothrow(); - getCurFunction()->setHasBranchProtectedScope(); + setFunctionHasBranchProtectedScope(); return OMPTaskDirective::Create(Context, StartLoc, EndLoc, Clauses, AStmt, DSAStack->isCancelRegion()); @@ -5689,7 +5689,7 @@ StmtResult Sema::ActOnOpenMPTaskgroupDirective(ArrayRef<OMPClause *> Clauses, assert(isa<CapturedStmt>(AStmt) && "Captured statement expected"); - getCurFunction()->setHasBranchProtectedScope(); + setFunctionHasBranchProtectedScope(); return OMPTaskgroupDirective::Create(Context, StartLoc, EndLoc, Clauses, AStmt, @@ -5772,7 +5772,7 @@ StmtResult Sema::ActOnOpenMPOrderedDirective(ArrayRef<OMPClause *> Clauses, if (AStmt) { assert(isa<CapturedStmt>(AStmt) && "Captured statement expected"); - getCurFunction()->setHasBranchProtectedScope(); + setFunctionHasBranchProtectedScope(); } return OMPOrderedDirective::Create(Context, StartLoc, EndLoc, Clauses, AStmt); @@ -6442,7 +6442,7 @@ StmtResult Sema::ActOnOpenMPAtomicDirective(ArrayRef<OMPClause *> Clauses, } } - getCurFunction()->setHasBranchProtectedScope(); + setFunctionHasBranchProtectedScope(); return OMPAtomicDirective::Create(Context, StartLoc, EndLoc, Clauses, AStmt, X, V, E, UE, IsXLHSInRHSPart, @@ -6507,7 +6507,7 @@ StmtResult Sema::ActOnOpenMPTargetDirective(ArrayRef<OMPClause *> Clauses, } } - getCurFunction()->setHasBranchProtectedScope(); + setFunctionHasBranchProtectedScope(); return OMPTargetDirective::Create(Context, StartLoc, EndLoc, Clauses, AStmt); } @@ -6537,7 +6537,7 @@ Sema::ActOnOpenMPTargetParallelDirective(ArrayRef<OMPClause *> Clauses, CS->getCapturedDecl()->setNothrow(); } - getCurFunction()->setHasBranchProtectedScope(); + setFunctionHasBranchProtectedScope(); return OMPTargetParallelDirective::Create(Context, StartLoc, EndLoc, Clauses, AStmt); @@ -6592,7 +6592,7 @@ StmtResult Sema::ActOnOpenMPTargetParallelForDirective( } } - getCurFunction()->setHasBranchProtectedScope(); + setFunctionHasBranchProtectedScope(); return OMPTargetParallelForDirective::Create(Context, StartLoc, EndLoc, NestedLoopCount, Clauses, AStmt, B, DSAStack->isCancelRegion()); @@ -6629,7 +6629,7 @@ StmtResult Sema::ActOnOpenMPTargetDataDirective(ArrayRef<OMPClause *> Clauses, return StmtError(); } - getCurFunction()->setHasBranchProtectedScope(); + setFunctionHasBranchProtectedScope(); return OMPTargetDataDirective::Create(Context, StartLoc, EndLoc, Clauses, AStmt); @@ -6756,7 +6756,7 @@ StmtResult Sema::ActOnOpenMPTeamsDirective(ArrayRef<OMPClause *> Clauses, // longjmp() and throw() must not violate the entry/exit criteria. CS->getCapturedDecl()->setNothrow(); - getCurFunction()->setHasBranchProtectedScope(); + setFunctionHasBranchProtectedScope(); DSAStack->setParentTeamsRegionLoc(StartLoc); @@ -6879,7 +6879,7 @@ StmtResult Sema::ActOnOpenMPTaskLoopDirective( if (checkReductionClauseWithNogroup(*this, Clauses)) return StmtError(); - getCurFunction()->setHasBranchProtectedScope(); + setFunctionHasBranchProtectedScope(); return OMPTaskLoopDirective::Create(Context, StartLoc, EndLoc, NestedLoopCount, Clauses, AStmt, B); } @@ -6929,7 +6929,7 @@ StmtResult Sema::ActOnOpenMPTaskLoopSimdDirective( if (checkSimdlenSafelenSpecified(*this, Clauses)) return StmtError(); - getCurFunction()->setHasBranchProtectedScope(); + setFunctionHasBranchProtectedScope(); return OMPTaskLoopSimdDirective::Create(Context, StartLoc, EndLoc, NestedLoopCount, Clauses, AStmt, B); } @@ -6955,7 +6955,7 @@ StmtResult Sema::ActOnOpenMPDistributeDirective( assert((CurContext->isDependentContext() || B.builtAll()) && "omp for loop exprs were not built"); - getCurFunction()->setHasBranchProtectedScope(); + setFunctionHasBranchProtectedScope(); return OMPDistributeDirective::Create(Context, StartLoc, EndLoc, NestedLoopCount, Clauses, AStmt, B); } @@ -6999,7 +6999,7 @@ StmtResult Sema::ActOnOpenMPDistributeParallelForDirective( assert((CurContext->isDependentContext() || B.builtAll()) && "omp for loop exprs were not built"); - getCurFunction()->setHasBranchProtectedScope(); + setFunctionHasBranchProtectedScope(); return OMPDistributeParallelForDirective::Create( Context, StartLoc, EndLoc, NestedLoopCount, Clauses, AStmt, B, DSAStack->isCancelRegion()); @@ -7058,7 +7058,7 @@ StmtResult Sema::ActOnOpenMPDistributeParallelForSimdDirective( if (checkSimdlenSafelenSpecified(*this, Clauses)) return StmtError(); - getCurFunction()->setHasBranchProtectedScope(); + setFunctionHasBranchProtectedScope(); return OMPDistributeParallelForSimdDirective::Create( Context, StartLoc, EndLoc, NestedLoopCount, Clauses, AStmt, B); } @@ -7115,7 +7115,7 @@ StmtResult Sema::ActOnOpenMPDistributeSimdDirective( if (checkSimdlenSafelenSpecified(*this, Clauses)) return StmtError(); - getCurFunction()->setHasBranchProtectedScope(); + setFunctionHasBranchProtectedScope(); return OMPDistributeSimdDirective::Create(Context, StartLoc, EndLoc, NestedLoopCount, Clauses, AStmt, B); } @@ -7171,7 +7171,7 @@ StmtResult Sema::ActOnOpenMPTargetParallelForSimdDirective( if (checkSimdlenSafelenSpecified(*this, Clauses)) return StmtError(); - getCurFunction()->setHasBranchProtectedScope(); + setFunctionHasBranchProtectedScope(); return OMPTargetParallelForSimdDirective::Create( Context, StartLoc, EndLoc, NestedLoopCount, Clauses, AStmt, B); } @@ -7228,7 +7228,7 @@ StmtResult Sema::ActOnOpenMPTargetSimdDirective( if (checkSimdlenSafelenSpecified(*this, Clauses)) return StmtError(); - getCurFunction()->setHasBranchProtectedScope(); + setFunctionHasBranchProtectedScope(); return OMPTargetSimdDirective::Create(Context, StartLoc, EndLoc, NestedLoopCount, Clauses, AStmt, B); } @@ -7271,7 +7271,7 @@ StmtResult Sema::ActOnOpenMPTeamsDistributeDirective( assert((CurContext->isDependentContext() || B.builtAll()) && "omp teams distribute loop exprs were not built"); - getCurFunction()->setHasBranchProtectedScope(); + setFunctionHasBranchProtectedScope(); DSAStack->setParentTeamsRegionLoc(StartLoc); @@ -7334,7 +7334,7 @@ StmtResult Sema::ActOnOpenMPTeamsDistributeSimdDirective( if (checkSimdlenSafelenSpecified(*this, Clauses)) return StmtError(); - getCurFunction()->setHasBranchProtectedScope(); + setFunctionHasBranchProtectedScope(); DSAStack->setParentTeamsRegionLoc(StartLoc); @@ -7397,7 +7397,7 @@ StmtResult Sema::ActOnOpenMPTeamsDistributeParallelForSimdDirective( if (checkSimdlenSafelenSpecified(*this, Clauses)) return StmtError(); - getCurFunction()->setHasBranchProtectedScope(); + setFunctionHasBranchProtectedScope(); DSAStack->setParentTeamsRegionLoc(StartLoc); @@ -7446,7 +7446,7 @@ StmtResult Sema::ActOnOpenMPTeamsDistributeParallelForDirective( assert((CurContext->isDependentContext() || B.builtAll()) && "omp for loop exprs were not built"); - getCurFunction()->setHasBranchProtectedScope(); + setFunctionHasBranchProtectedScope(); DSAStack->setParentTeamsRegionLoc(StartLoc); @@ -7480,7 +7480,7 @@ StmtResult Sema::ActOnOpenMPTargetTeamsDirective(ArrayRef<OMPClause *> Clauses, // longjmp() and throw() must not violate the entry/exit criteria. CS->getCapturedDecl()->setNothrow(); } - getCurFunction()->setHasBranchProtectedScope(); + setFunctionHasBranchProtectedScope(); return OMPTargetTeamsDirective::Create(Context, StartLoc, EndLoc, Clauses, AStmt); @@ -7525,7 +7525,7 @@ StmtResult Sema::ActOnOpenMPTargetTeamsDistributeDirective( assert((CurContext->isDependentContext() || B.builtAll()) && "omp target teams distribute loop exprs were not built"); - getCurFunction()->setHasBranchProtectedScope(); + setFunctionHasBranchProtectedScope(); return OMPTargetTeamsDistributeDirective::Create( Context, StartLoc, EndLoc, NestedLoopCount, Clauses, AStmt, B); } @@ -7580,7 +7580,7 @@ StmtResult Sema::ActOnOpenMPTargetTeamsDistributeParallelForDirective( } } - getCurFunction()->setHasBranchProtectedScope(); + setFunctionHasBranchProtectedScope(); return OMPTargetTeamsDistributeParallelForDirective::Create( Context, StartLoc, EndLoc, NestedLoopCount, Clauses, AStmt, B, DSAStack->isCancelRegion()); @@ -7641,7 +7641,7 @@ StmtResult Sema::ActOnOpenMPTargetTeamsDistributeParallelForSimdDirective( if (checkSimdlenSafelenSpecified(*this, Clauses)) return StmtError(); - getCurFunction()->setHasBranchProtectedScope(); + setFunctionHasBranchProtectedScope(); return OMPTargetTeamsDistributeParallelForSimdDirective::Create( Context, StartLoc, EndLoc, NestedLoopCount, Clauses, AStmt, B); } @@ -7699,7 +7699,7 @@ StmtResult Sema::ActOnOpenMPTargetTeamsDistributeSimdDirective( if (checkSimdlenSafelenSpecified(*this, Clauses)) return StmtError(); - getCurFunction()->setHasBranchProtectedScope(); + setFunctionHasBranchProtectedScope(); return OMPTargetTeamsDistributeSimdDirective::Create( Context, StartLoc, EndLoc, NestedLoopCount, Clauses, AStmt, B); } @@ -12450,7 +12450,7 @@ void Sema::ActOnOpenMPDeclareReductionCombinerStart(Scope *S, Decl *D) { // Enter new function scope. PushFunctionScope(); - getCurFunction()->setHasBranchProtectedScope(); + setFunctionHasBranchProtectedScope(); getCurFunction()->setHasOMPDeclareReductionCombiner(); if (S != nullptr) @@ -12506,7 +12506,7 @@ VarDecl *Sema::ActOnOpenMPDeclareReductionInitializerStart(Scope *S, Decl *D) { // Enter new function scope. PushFunctionScope(); - getCurFunction()->setHasBranchProtectedScope(); + setFunctionHasBranchProtectedScope(); if (S != nullptr) PushDeclContext(S, DRD); |