diff options
| author | Vedant Kumar <vsk@apple.com> | 2016-10-14 23:38:16 +0000 |
|---|---|---|
| committer | Vedant Kumar <vsk@apple.com> | 2016-10-14 23:38:16 +0000 |
| commit | 9d2a16b9b19bb3c63f7cba894fa1043b1487768d (patch) | |
| tree | 77a1276e0a955cfb0ef55c6daba36525f6b161ce /clang/lib/CodeGen/CodeGenPGO.cpp | |
| parent | f2a6ec55215dbbbadcc78a0e091c1cfda611cdef (diff) | |
| download | bcm5719-llvm-9d2a16b9b19bb3c63f7cba894fa1043b1487768d.tar.gz bcm5719-llvm-9d2a16b9b19bb3c63f7cba894fa1043b1487768d.zip | |
[Coverage] Support for C++17 if initializers
Differential Revision: https://reviews.llvm.org/D25572
llvm-svn: 284293
Diffstat (limited to 'clang/lib/CodeGen/CodeGenPGO.cpp')
| -rw-r--r-- | clang/lib/CodeGen/CodeGenPGO.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CodeGenPGO.cpp b/clang/lib/CodeGen/CodeGenPGO.cpp index 02738eb209d..c6c3fa41e62 100644 --- a/clang/lib/CodeGen/CodeGenPGO.cpp +++ b/clang/lib/CodeGen/CodeGenPGO.cpp @@ -490,6 +490,8 @@ struct ComputeRegionCounts : public ConstStmtVisitor<ComputeRegionCounts> { void VisitIfStmt(const IfStmt *S) { RecordStmtCount(S); uint64_t ParentCount = CurrentCount; + if (S->getInit()) + Visit(S->getInit()); Visit(S->getCond()); // Counter tracks the "then" part of an if statement. The count for |

