<div dir="ltr">Hi All,<div><br></div><div>I tried to use line directive in one of my C++ source file hoping that the report generated from llvm-cov will display the file name and line number specified in "#line ..." directive instead of the real file that got compiled, but it does not seem to work.</div><div><br></div><div>Do you know how or if it is even possible to do so?</div><div><br></div><div><font face="monospace, monospace">[detailed problem description]</font></div><div><font face="monospace, monospace">1. I have a main file named "foo.cpp" and another file named "real.cpp"</font></div><div><font face="monospace, monospace">2. at the bottom of "foo.cpp", it has a block of code clipped from "real.cpp" (say line 10 to line 20 of real.cpp).</font></div><div><font face="monospace, monospace">3. right before the clipped code, I added the following line directive in front of it (in foo.cpp).</font></div><div><font face="monospace, monospace">    #line 10 "real.cpp"<br></font></div><div><font face="monospace, monospace">4. Then, I compile it (clang++ -fprofile-instr-generate -fcoverage-mapping foo.cpp -o foo), run the executable file, get raw profile, index the raw profile, and run llvm-cov -show/report to read the coverage.</font></div><div><font face="monospace, monospace">5. In the report, the file name always shows up as "foo.cpp" NOT "real.cpp"</font></div><div><font face="monospace, monospace">6. What I really want is having the report showing line number and file name from "real.cpp".</font></div><div><br></div><div>Thank you very much for your time and help.</div><div><br></div><div>Best,</div><div>Chien</div></div>