]> granicus.if.org Git - clang/commit
InstrProf: Fix handling of profile counters in the body of range based for
authorJustin Bogner <mail@justinbogner.com>
Thu, 30 Apr 2015 22:58:28 +0000 (22:58 +0000)
committerJustin Bogner <mail@justinbogner.com>
Thu, 30 Apr 2015 22:58:28 +0000 (22:58 +0000)
commit6691d93dd021da02e8f264035b954375003b1c33
tree4fcbbe4ae1e867c16c81c5a4d9ccf3f5d6782e00
parentf42386354940c9be444f4742b4d5c8ac77668afc
InstrProf: Fix handling of profile counters in the body of range based for

We were assigning the counter for the body of the loop to the loop
variable initialization for some reason here, but our tests completely
lacked coverage for range-for loops. This fixes that and makes the
logic generally more similar to the logic for a regular for.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@236277 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CodeGenPGO.cpp
test/Profile/Inputs/cxx-rangefor.proftext [new file with mode: 0644]
test/Profile/cxx-rangefor.cpp [new file with mode: 0644]