diff options
Diffstat (limited to 'clang/lib/CodeGen/CGException.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGException.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CGException.cpp b/clang/lib/CodeGen/CGException.cpp index 39a992aab17..26e061d41ab 100644 --- a/clang/lib/CodeGen/CGException.cpp +++ b/clang/lib/CodeGen/CGException.cpp @@ -1294,6 +1294,10 @@ void CodeGenFunction::ExitCXXTryStmt(const CXXTryStmt &S, bool IsFnTryBlock) { // Initialize the catch variable and set up the cleanups. BeginCatch(*this, C); + // Emit the PGO counter increment + RegionCounter CatchCnt = getPGORegionCounter(C); + CatchCnt.beginRegion(Builder); + // Perform the body of the catch. EmitStmt(C->getHandlerBlock()); @@ -1320,7 +1324,9 @@ void CodeGenFunction::ExitCXXTryStmt(const CXXTryStmt &S, bool IsFnTryBlock) { Builder.CreateBr(ContBB); } + RegionCounter ContCnt = getPGORegionCounter(&S); EmitBlock(ContBB); + ContCnt.beginRegion(Builder); } namespace { |