summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGClass.cpp
diff options
context:
space:
mode:
authorJustin Bogner <mail@justinbogner.com>2014-01-23 02:54:27 +0000
committerJustin Bogner <mail@justinbogner.com>2014-01-23 02:54:27 +0000
commit81c22c2faef9378a0e79c02ca58b055b3e2d0ec5 (patch)
treea4c3c6555f38cb7bc9844bad8731509ba9cfc0d8 /clang/lib/CodeGen/CGClass.cpp
parent0960d091a9dc4e661f3c129c53f5bc344ea3fa7a (diff)
downloadbcm5719-llvm-81c22c2faef9378a0e79c02ca58b055b3e2d0ec5.tar.gz
bcm5719-llvm-81c22c2faef9378a0e79c02ca58b055b3e2d0ec5.zip
CodeGen: Handle PGO counters for constructors and destructors
llvm-svn: 199864
Diffstat (limited to 'clang/lib/CodeGen/CGClass.cpp')
-rw-r--r--clang/lib/CodeGen/CGClass.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CGClass.cpp b/clang/lib/CodeGen/CGClass.cpp
index d3a1f391f77..8577c3e034a 100644
--- a/clang/lib/CodeGen/CGClass.cpp
+++ b/clang/lib/CodeGen/CGClass.cpp
@@ -721,6 +721,9 @@ void CodeGenFunction::EmitConstructorBody(FunctionArgList &Args) {
if (IsTryBody)
EnterCXXTryStmt(*cast<CXXTryStmt>(Body), true);
+ RegionCounter Cnt = getPGORegionCounter(Body);
+ Cnt.beginRegion(Builder);
+
RunCleanupsScope RunCleanups(*this);
// TODO: in restricted cases, we can emit the vbase initializers of
@@ -1319,6 +1322,9 @@ void CodeGenFunction::EmitDestructorBody(FunctionArgList &Args) {
case Dtor_Base:
assert(Body);
+ RegionCounter Cnt = getPGORegionCounter(Body);
+ Cnt.beginRegion(Builder);
+
// Enter the cleanup scopes for fields and non-virtual bases.
EnterDtorCleanups(Dtor, Dtor_Base);
OpenPOWER on IntegriCloud