summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/ProfileData/CoverageMappingTest.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* InstrProf: Treat functions with a coverage map but no profile as unreachedJustin Bogner2015-05-131-0/+15
| | | | | | | | | | If we have a coverage mapping but no profile data for a function, calling it mismatched is misleading. This can just as easily be unreachable code that was stripped from the binary. Instead, treat these the same as functions where we have an explicit "zero" coverage map by setting the count to zero for each mapped region. llvm-svn: 237298
* InstrProf: Strip filename prefixes from the names we display for coverageJustin Bogner2015-05-051-0/+14
| | | | | | | For consumers of coverage data, any filename prefixes we store in the profile data are just noise. Strip this prefix if it exists. llvm-svn: 236558
* InstrProf: Don't combine expansion regions with code regionsJustin Bogner2015-02-181-0/+37
| | | | | | | | This was leading to duplicate counts when a code region happened to overlap exactly with an expansion. The combining behaviour only makes sense for code regions. llvm-svn: 229723
* InstrProf: Handle unknown functions if they consist only of zero-regionsJustin Bogner2015-02-181-0/+13
| | | | | | | | | | This comes up when we generate coverage for a function but don't end up emitting the function at all - dead static functions or inline functions that aren't referenced in a particular TU, for example. In these cases we'd like to show that the function was never called, which is trivially true. llvm-svn: 229717
* InstrProf: Make CoverageMapping testable and add a basic unit testJustin Bogner2015-02-181-0/+82
| | | | | | | | Make CoverageMapping easier to create, so that we can write targeted unit tests for its internals, and add a some infrastructure to write these tests. Finally, add a simple unit test for basic functionality. llvm-svn: 229709
* Re-apply "InstrProf: Use a test fixture in the coverage mapping tests"Justin Bogner2015-02-171-67/+81
| | | | | | | | | | This time we use a helper to format the assertion so we can just use ASSERT_TRUE instead of relying on ASSERT_EQ being able to deal with conversions between enum types. This reverts r229496, re-applying r229473. llvm-svn: 229547
* Reverting r229473; it does not compile with MSVC 2013, and I suspect it was ↵Aaron Ballman2015-02-171-77/+69
| | | | | | meant to be reverted in r229483. llvm-svn: 229496
* InstrProf: Use a test fixture in the coverage mapping testsJustin Bogner2015-02-171-69/+77
| | | | llvm-svn: 229473
* InstrProf: Avoid using std::to_stringJustin Bogner2015-02-051-2/+4
| | | | | | | | | Apparently std::to_string doesn't exist in mingw32: http://lab.llvm.org:8011/builders/clang-native-mingw32-win7/builds/7990 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52015 llvm-svn: 228340
* InstrProf: std::to_string needs to #include <string>Justin Bogner2015-02-041-0/+2
| | | | llvm-svn: 228136
* InstrProf: Add some unit tests for CoverageMappingJustin Bogner2015-02-041-0/+112
The llvm-level tests for coverage mapping need a binary input file, which means they're hard to understand, hard to update, and it's difficult to add new ones. By adding some unit tests that build up the coverage data structures in C++, we can write more meaningful and targeted tests. llvm-svn: 228084
OpenPOWER on IntegriCloud