]> granicus.if.org Git - clang/commit
InstrProf: Fix coverage mapping when "if" is a macro
authorJustin Bogner <mail@justinbogner.com>
Tue, 16 Jun 2015 06:24:15 +0000 (06:24 +0000)
committerJustin Bogner <mail@justinbogner.com>
Tue, 16 Jun 2015 06:24:15 +0000 (06:24 +0000)
commit2e855badf1e8b8541b1ed7dcfbe86c9813088087
tree59ac0764a55ab9a59b574775ce78bda38efb022d
parent1991fe29ae699272e924494f2be6e08e410c4557
InstrProf: Fix coverage mapping when "if" is a macro

We were propagating the coverage map into the body of an if statement,
but not into the condition thereafter. This is fine as long as the two
locations are in the same virtual file, but they won't be when the
"if" part of the statement is from a macro and the condition is not.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@239803 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CoverageMappingGen.cpp
test/CoverageMapping/control-flow-macro.c [new file with mode: 0644]