This website requires JavaScript.
Explore
Help
Sign In
maxjhandsome
/
llvm-project
forked from
OSchip/llvm-project
Watch
1
Star
0
Fork
You've already forked llvm-project
0
Code
Issues
Pull Requests
Packages
Releases
Wiki
Activity
b346eaa647
llvm-project
/
clang
/
test
/
CoverageMapping
/
Inputs
/
code.h
14 lines
133 B
C
Raw
Normal View
History
Unescape
Escape
InstrProf: Rewrite most of coverage mapping generation in a simpler way The coverage mapping generation code previously generated a large number of redundant coverage regions and then tried to merge similar ones back together. This then relied on some awkward heuristics to prevent combining of regions that were importantly different but happened to have the same count. The end result was inefficient and hard to follow. Now, we more carefully create the regions we actually want. This makes it much easier to create regions at precise locations as well as making the basic approach quite a bit easier to follow. There's still a fair bit of complexity here dealing with included code and macro expansions, but that's pretty hard to avoid without significantly reducing the quality of data we provide. I had to modify quite a few tests where the source ranges became more precise or the old ranges seemed to be wrong anyways, and I've added quite a few new tests since a large number of constructs didn't seem to be tested before. llvm-svn: 229748
2015-02-19 05:24:51 +08:00
// Some code for the middle of a program
Add tests for coverage mapping generation. This patch adds the tests for the coverage mapping generation. Most of the tests check the mapping regions produced by the generator, and one checks the llvm IR. Differential Revision: http://reviews.llvm.org/D4847 llvm-svn: 215995
2014-08-20 01:32:30 +08:00
x
=
x
;
if
(
x
=
=
0
)
{
x
=
1
;
}
else
{
x
=
2
;
}
if
(
true
)
{
x
=
x
;
}
else
{
x
=
x
;
}