diff options
author | Justin Bogner <mail@justinbogner.com> | 2014-01-23 02:54:27 +0000 |
---|---|---|
committer | Justin Bogner <mail@justinbogner.com> | 2014-01-23 02:54:27 +0000 |
commit | 81c22c2faef9378a0e79c02ca58b055b3e2d0ec5 (patch) | |
tree | a4c3c6555f38cb7bc9844bad8731509ba9cfc0d8 /clang/lib/CodeGen/CGClass.cpp | |
parent | 0960d091a9dc4e661f3c129c53f5bc344ea3fa7a (diff) | |
download | bcm5719-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.cpp | 6 |
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); |