diff options
Diffstat (limited to 'clang/lib/CodeGen/CGStmt.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGStmt.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/clang/lib/CodeGen/CGStmt.cpp b/clang/lib/CodeGen/CGStmt.cpp index ade6ac91852..a9c691ea0cd 100644 --- a/clang/lib/CodeGen/CGStmt.cpp +++ b/clang/lib/CodeGen/CGStmt.cpp @@ -404,14 +404,14 @@ void CodeGenFunction::EmitGotoStmt(const GotoStmt &S) { EmitStopPoint(&S); EmitBranchThroughCleanup(getJumpDestForLabel(S.getLabel())); - PGO.setCurrentRegionCount(0); + PGO.setCurrentRegionUnreachable(); } void CodeGenFunction::EmitIndirectGotoStmt(const IndirectGotoStmt &S) { if (const LabelDecl *Target = S.getConstantTarget()) { EmitBranchThroughCleanup(getJumpDestForLabel(Target)); - PGO.setCurrentRegionCount(0); + PGO.setCurrentRegionUnreachable(); return; } @@ -428,7 +428,7 @@ void CodeGenFunction::EmitIndirectGotoStmt(const IndirectGotoStmt &S) { cast<llvm::PHINode>(IndGotoBB->begin())->addIncoming(V, CurBB); EmitBranch(IndGotoBB); - PGO.setCurrentRegionCount(0); + PGO.setCurrentRegionUnreachable(); } void CodeGenFunction::EmitIfStmt(const IfStmt &S) { @@ -847,7 +847,7 @@ void CodeGenFunction::EmitReturnOfRValue(RValue RV, QualType Ty) { /*init*/ true); } EmitBranchThroughCleanup(ReturnBlock); - PGO.setCurrentRegionCount(0); + PGO.setCurrentRegionUnreachable(); } /// EmitReturnStmt - Note that due to GCC extensions, this can have an operand @@ -920,7 +920,7 @@ void CodeGenFunction::EmitReturnStmt(const ReturnStmt &S) { cleanupScope.ForceCleanup(); EmitBranchThroughCleanup(ReturnBlock); - PGO.setCurrentRegionCount(0); + PGO.setCurrentRegionUnreachable(); } void CodeGenFunction::EmitDeclStmt(const DeclStmt &S) { @@ -950,7 +950,7 @@ void CodeGenFunction::EmitBreakStmt(const BreakStmt &S) { if (BC.CountBreak) BC.LoopCnt->getBreakCounter().beginRegion(Builder); EmitBranchThroughCleanup(BC.BreakBlock); - PGO.setCurrentRegionCount(0); + PGO.setCurrentRegionUnreachable(); } void CodeGenFunction::EmitContinueStmt(const ContinueStmt &S) { @@ -967,7 +967,7 @@ void CodeGenFunction::EmitContinueStmt(const ContinueStmt &S) { // non-local exits in PGO instrumentation. BC.LoopCnt->getContinueCounter().beginRegion(Builder); EmitBranchThroughCleanup(BC.ContinueBlock); - PGO.setCurrentRegionCount(0); + PGO.setCurrentRegionUnreachable(); } /// EmitCaseStmtRange - If case statement range is not too big then @@ -1438,7 +1438,7 @@ void CodeGenFunction::EmitSwitchStmt(const SwitchStmt &S) { // Clear the insertion point to indicate we are in unreachable code. Builder.ClearInsertionPoint(); - PGO.setCurrentRegionCount(0); + PGO.setCurrentRegionUnreachable(); // All break statements jump to NextBlock. If BreakContinueStack is non-empty // then reuse last ContinueBlock and that block's counter. |