diff options
| author | 2017-01-24 08:32:59 +0000 | |
|---|---|---|
| committer | 2017-01-24 08:32:59 +0000 | |
| commit | 53d771aafdbe5b919f264f53cba3788e2c4cffd2 (patch) | |
| tree | 7eca39498be0ff1e3a6daf583cd9ca5886bb2636 /gnu/llvm/tools/clang/lib/CodeGen/CodeGenPGO.cpp | |
| parent | In preparation of compiling our kernels with -ffreestanding, explicitly map (diff) | |
| download | wireguard-openbsd-53d771aafdbe5b919f264f53cba3788e2c4cffd2.tar.xz wireguard-openbsd-53d771aafdbe5b919f264f53cba3788e2c4cffd2.zip | |
Import LLVM 4.0.0 rc1 including clang and lld to help the current
development effort on OpenBSD/arm64.
Diffstat (limited to 'gnu/llvm/tools/clang/lib/CodeGen/CodeGenPGO.cpp')
| -rw-r--r-- | gnu/llvm/tools/clang/lib/CodeGen/CodeGenPGO.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gnu/llvm/tools/clang/lib/CodeGen/CodeGenPGO.cpp b/gnu/llvm/tools/clang/lib/CodeGen/CodeGenPGO.cpp index 4eefdd72b7e..c6c3fa41e62 100644 --- a/gnu/llvm/tools/clang/lib/CodeGen/CodeGenPGO.cpp +++ b/gnu/llvm/tools/clang/lib/CodeGen/CodeGenPGO.cpp @@ -458,6 +458,8 @@ struct ComputeRegionCounts : public ConstStmtVisitor<ComputeRegionCounts> { void VisitSwitchStmt(const SwitchStmt *S) { RecordStmtCount(S); + if (S->getInit()) + Visit(S->getInit()); Visit(S->getCond()); CurrentCount = 0; BreakContinueStack.push_back(BreakContinue()); @@ -488,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 |
