summaryrefslogtreecommitdiffstats
path: root/clang/test/CoverageMapping/preprocessor.c
Commit message (Collapse)AuthorAgeFilesLines
* [Coverage] Emit a gap area after if conditionsVedant Kumar2017-11-091-1/+1
| | | | | | | | | | | | | | | | | | | The area immediately after the closing right-paren of an if condition should have a count equal to the 'then' block's count. Use a gap region to set this count, so that region highlighting for the 'then' block remains precise. This solves a problem we have with wrapped segments. Consider: 1| if (false) 2| foo(); Without a gap area starting after the condition, the wrapped segment from line 1 would make it look like line 2 is executed, when it's not. rdar://35373009 llvm-svn: 317758
* [Lexer] Report more precise skipped regions (PR34166)Vedant Kumar2017-09-111-10/+43
| | | | | | | | | | | | | | | | | | | | This patch teaches the preprocessor to report more precise source ranges for code that is skipped due to conditional directives. The new behavior includes the '#' from the opening directive and the full text of the line containing the closing directive in the skipped area. This matches up clang's behavior (we don't IRGen the code between the closing "endif" and the end of a line). This also affects the code coverage implementation. See llvm.org/PR34166 (this also happens to be rdar://problem/23224058). The old behavior (report the end of the skipped range as the end location of the 'endif' token) is preserved for indexing clients. Differential Revision: https://reviews.llvm.org/D36642 llvm-svn: 312947
* [PGO] cc1 option name change for profile instrumentationRong Xu2016-02-041-1/+1
| | | | | | | | | | | | This patch changes cc1 option -fprofile-instr-generate to an enum option -fprofile-instrument={clang|none}. It also changes cc1 options -fprofile-instr-generate= to -fprofile-instrument-path=. The driver level option -fprofile-instr-generate and -fprofile-instr-generate= remain intact. This change will pave the way to integrate new PGO instrumentation in IR level. Review: http://reviews.llvm.org/D16730 llvm-svn: 259811
* InstrProf: Always emit a coverage region for the condition of an ifJustin Bogner2015-02-191-1/+2
| | | | | | | | When tools like llvm-cov show regions, it's much easier to understand what's happening if the condition of an if shows a counter as well as the body. llvm-svn: 229813
* InstrProf: Remove CoverageMapping::HasCodeBefore, it isn't usedJustin Bogner2015-02-031-6/+6
| | | | llvm-svn: 228035
* Add tests for coverage mapping generation.Alex Lorenz2014-08-191-0/+37
| | | | | | | | | | 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
* Revert "Add tests for coverage mapping generation."Justin Bogner2014-08-091-45/+0
| | | | | | | | | | | | | | | I reverted one of the added tests from r215261 in r215274, since it was failing on quite a few bots. It looks like this wasn't sufficient, as we're still getting failures on windows, like the following: http://bb.pgr.jp/builders/ninja-x64-msvc-RA-centos6/builds/5378 I'm reverting this entire commit so the bots aren't blocked on these failures. This reverts commit r215261. llvm-svn: 215278
* Add tests for coverage mapping generation.Alex Lorenz2014-08-081-0/+45
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/D4793 llvm-svn: 215261
OpenPOWER on IntegriCloud