]> granicus.if.org Git - clang/commit
CodeGen: Avoid instrumenting implicit Decls more effectively
authorJustin Bogner <mail@justinbogner.com>
Fri, 25 Apr 2014 07:20:05 +0000 (07:20 +0000)
committerJustin Bogner <mail@justinbogner.com>
Fri, 25 Apr 2014 07:20:05 +0000 (07:20 +0000)
commit2196195a2a825cf60a455337133969c9870672c1
tree071f2e436f594acffac71b911b4e6aca79be84e8
parent4f2e3bb97d2b431dfc302ebbd43976c24739b15e
CodeGen: Avoid instrumenting implicit Decls more effectively

We don't assign counters for implicit Decls, but we were emitting code
to increment the (non-existent) counters and adding empty counter
lists in the output. This fixes the checks in assignRegionCounters and
emitInstrumentationData to do the right thing, and adds an assert for
the pathological case of emitting zero counters.

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