]> granicus.if.org Git - clang/commit
CodeGen: Fix handling of C++11 lambdas in profiling
authorJustin Bogner <mail@justinbogner.com>
Fri, 11 Apr 2014 23:06:35 +0000 (23:06 +0000)
committerJustin Bogner <mail@justinbogner.com>
Fri, 11 Apr 2014 23:06:35 +0000 (23:06 +0000)
commit85ac3c716b1cadd7147b8545b0393263d2e8bbf6
tree37ad934d577260342b1257d8667fecf952ecb16d
parent4639d293beef1db30b3523f1ad00c19754fa6f99
CodeGen: Fix handling of C++11 lambdas in profiling

Until now we were generating duplicate counters for lambdas: one set
in the function where the lambda was declared and another for the
lambda itself. Instead, we should skip over the bodies of lambdas in
their containing contexts.

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