Lines Matching +refs:clang +refs:format +refs:style
2 :format: html
14 LLVM's code coverage mapping format is used to provide code coverage
24 then we briefly desribe LLVM's code coverage mapping format and the
25 way that Clang and LLVM's code coverage tool work with this format. After
26 the basics are down, more advanced features of the coverage mapping format
40 ``clang -o test -fprofile-instr-generate -fcoverage-mapping test.c``
56 LLVM's code coverage mapping format is designed to be a self contained
57 data format, that can be embedded into the LLVM IR and object files.
58 It's described in this document as a **mapping** format because its goal is
65 1. When clang compiles a source file with ``-fcoverage-mapping``, it
77 The coverage mapping format aims to be a "universal format" that would be
89 coverage mapping format works.
91 The coverage mapping format operates on a per-function level as the
113 …-html:`<pre class='highlight' style='line-height:initial;'><span>int main(int argc, const char *ar…
114 <span style='background-color:#4A789C'> </span>
115 …<span style='background-color:#4A789C'> if (argc > 1) </span><span style='background-color:#85…
116 <span style='background-color:#85C1F5'> printf("%s\n", argv[1]); </span>
117 …<span style='background-color:#85C1F5'> }</span><span style='background-color:#4A789C'> else </sp…
118 <span style='background-color:#F6D55D'> printf("\n"); </span>
119 …<span style='background-color:#F6D55D'> }</span><span style='background-color:#4A789C'> …
120 <span style='background-color:#4A789C'> return 0; </span>
121 <span style='background-color:#4A789C'>}</span>
130 …:raw-html:`<pre class='highlight' style='line-height:initial;'><span>int main() </span><span style…
131 …<span style='background-color:#85C1F5'>#ifdef DEBUG </span> <span class='c1'>// Skip…
132 <span style='background-color:#85C1F5'> printf("Hello world"); </span>
133 …<span style='background-color:#85C1F5'>#</span><span style='background-color:#4A789C'>endif …
134 <span style='background-color:#4A789C'> return 0; </span>
135 <span style='background-color:#4A789C'>}</span>
147 …:raw-html:`<pre class='highlight' style='line-height:initial;'><span>int func(int x) </span><span …
148 …style='background-color:#4A789C'> #define MAX(x,y) </span><span style='background-color:#85C1F5'>…
149 …<span style='background-color:#4A789C'> return </span><span style='background-color:#7FCA9F'>MAX<…
150 <span style='background-color:#4A789C'>}</span>
171 :raw-html:`<pre class='highlight' style='line-height:initial;'><span>void func(const char *str) </s…
172 <span style='background-color:#4A789C'> #define PUT </span><span style='background-color:#85C1F5'>…
173 <span style='background-color:#4A789C'> if(*str) </span>
174 <span style='background-color:#4A789C'> </span><span style='background-color:#F6D55D'>PUT</span>…
175 <span style='background-color:#4A789C'> </span><span style='background-color:#F6D55D'>PUT</span><s…
176 <span style='background-color:#4A789C'>}</span>
198 …-html:`<pre class='highlight' style='line-height:initial;'><span>int main(int argc, const char *ar…
199 <span style='background-color:#4A789C'> </span>
200 <span style='background-color:#4A789C'> if (argc > 1) </span><span style='background-color:#85C…
201 <span style='background-color:#85C1F5'> printf("%s\n", argv[1]); </span><span> </s…
202 <span style='background-color:#85C1F5'> }</span><span style='background-color:#4A789C'> else </spa…
203 <span style='background-color:#F6D55D'> printf("\n"); </span>
204 <span style='background-color:#F6D55D'> }</span><span style='background-color:#4A789C'> …
205 <span style='background-color:#4A789C'> return 0; </span>
206 <span style='background-color:#4A789C'>}</span>
213 :raw-html:`<pre class='highlight' style='line-height:initial;'><span>int main() </span><span style=…
214 <span style='background-color:#4A789C'> return 0; </span>
215 <span style='background-color:#4A789C'> </span><span style='background-color:#85C1F5'>printf("Hell…
216 <span style='background-color:#4A789C'>}</span>
252 i32 0, ; Coverage mapping format version
270 * 0 — The first (current) version of the coverage mapping format.
313 * The string contains values that are encoded in the LEB128 format, which is
381 The format of the structure follows:
396 This section describes the basic types that are used by the encoding format