<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Feb 8, 2016 at 11:08 AM, David Blaikie <span dir="ltr"><<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><span class="">On Mon, Feb 8, 2016 at 10:54 AM, Xinliang David Li via llvm-commits <span dir="ltr"><<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>On Mon, Feb 8, 2016 at 10:46 AM, Vedant Kumar <<a href="mailto:vsk@apple.com" target="_blank">vsk@apple.com</a>> wrote:<br>
> Could this be merged with the test in r260021?<br>
<br>
</span>In theory 260021 can be merged into this one ( end-to-end test)</blockquote><div><br></div></span><div>We don't generally do end-to-end tests in the LIT repo. I realize compiler-rt is a bit different, but I think this general attitude still holds.<br><br>Alexey (for want of any better person to consult - feel free to punt/CC others): what's the general philosophy on tests that go into compiler-rt's lit suite?</div></div></div></div></blockquote><div><br></div><div>compiler-rt lit test suite is tailored to running "end-to-end" tests: using just-built Clang to build an executable, run this executable,</div><div>and inspect its output somehow (via FileCheck, or other tools).</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><div class="h5"><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> -- but<br>
I think it is better to keep them separate as they are in different<br>
repos. I will clean up the test as you suggested else where.<br>
<span><br>
><br>
> Is this a Linux-specific test?<br>
<br>
</span>It should not be. It is just I don't have a good way to test on other<br>
platforms yet.<br>
<span><font color="#888888"><br>
David<br>
</font></span><div><div>><br>
> vedant<br>
><br>
>> On Feb 7, 2016, at 8:31 AM, Xinliang David Li via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>> wrote:<br>
>><br>
>> Author: davidxl<br>
>> Date: Sun Feb 7 10:31:13 2016<br>
>> New Revision: 260041<br>
>><br>
>> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=260041&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=260041&view=rev</a><br>
>> Log:<br>
>> Add coverage tests (defaulted constructors/destructor)<br>
>><br>
>> Added:<br>
>> compiler-rt/trunk/test/profile/Linux/coverage_ctors.cpp<br>
>> compiler-rt/trunk/test/profile/Linux/coverage_dtor.cpp<br>
>><br>
>> Added: compiler-rt/trunk/test/profile/Linux/coverage_ctors.cpp<br>
>> URL: <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/profile/Linux/coverage_ctors.cpp?rev=260041&view=auto" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/profile/Linux/coverage_ctors.cpp?rev=260041&view=auto</a><br>
>> ==============================================================================<br>
>> --- compiler-rt/trunk/test/profile/Linux/coverage_ctors.cpp (added)<br>
>> +++ compiler-rt/trunk/test/profile/Linux/coverage_ctors.cpp Sun Feb 7 10:31:13 2016<br>
>> @@ -0,0 +1,33 @@<br>
>> +// RUN: %clang_profgen -x c++ -std=c++11 -fuse-ld=gold -fcoverage-mapping -o %t %s<br>
>> +// RUN: env LLVM_PROFILE_FILE=%t.profraw %run %t<br>
>> +// RUN: llvm-profdata merge -o %t.profdata %t.profraw<br>
>> +// RUN: llvm-cov show %t -instr-profile %t.profdata -filename-equivalence 2>&1 | FileCheck %s<br>
>> +<br>
>> +struct Base {<br>
>> + int B;<br>
>> + Base() : B(2) {}<br>
>> + Base(const struct Base &b2) {<br>
>> + if (b2.B == 0) {<br>
>> + B = b2.B + 1;<br>
>> + } else<br>
>> + B = b2.B;<br>
>> + }<br>
>> +};<br>
>> +<br>
>> +struct Derived : public Base {<br>
>> + Derived(const Derived &) = default; // CHECK: 2| [[@LINE]]| Derived<br>
>> + Derived() = default; // CHECK: 1| [[@LINE]]| Derived<br>
>> + int I;<br>
>> + int J;<br>
>> + int getI() { return I; }<br>
>> +};<br>
>> +<br>
>> +Derived dd;<br>
>> +int g;<br>
>> +int main() {<br>
>> + Derived dd2(dd);<br>
>> + Derived dd3(dd);<br>
>> +<br>
>> + g = dd2.getI() + dd3.getI();<br>
>> + return 0;<br>
>> +}<br>
>><br>
>> Added: compiler-rt/trunk/test/profile/Linux/coverage_dtor.cpp<br>
>> URL: <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/profile/Linux/coverage_dtor.cpp?rev=260041&view=auto" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/profile/Linux/coverage_dtor.cpp?rev=260041&view=auto</a><br>
>> ==============================================================================<br>
>> --- compiler-rt/trunk/test/profile/Linux/coverage_dtor.cpp (added)<br>
>> +++ compiler-rt/trunk/test/profile/Linux/coverage_dtor.cpp Sun Feb 7 10:31:13 2016<br>
>> @@ -0,0 +1,26 @@<br>
>> +// RUN: %clang -x c++ -fno-exceptions -std=c++11 -fuse-ld=gold -fprofile-instr-generate -fcoverage-mapping -o %t %s<br>
>> +// RUN: env LLVM_PROFILE_FILE=%t.profraw %run %t<br>
>> +// RUN: llvm-profdata merge -o %t.profdata %t.profraw<br>
>> +// RUN: llvm-cov show %t -instr-profile %t.profdata -filename-equivalence 2>&1 | FileCheck %s<br>
>> +<br>
>> +struct Base {<br>
>> + int B;<br>
>> + Base(int B_) : B(B_) {}<br>
>> + ~Base() {}<br>
>> +};<br>
>> +<br>
>> +struct Derived : public Base {<br>
>> + Derived(int K) : Base(K), I(K), J(K) {}<br>
>> + ~Derived() = default; // CHECK: 2| [[@LINE]]| ~Derived<br>
>> + int I;<br>
>> + int J;<br>
>> + int getI() { return I; }<br>
>> +};<br>
>> +<br>
>> +int g;<br>
>> +int main() {<br>
>> + Derived dd(10);<br>
>> + Derived dd2(120);<br>
>> + g = dd2.getI() + dd.getI();<br>
>> + return 0;<br>
>> +}<br>
>><br>
>><br>
>> _______________________________________________<br>
>> llvm-commits mailing list<br>
>> <a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
>> <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
><br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</div></div></blockquote></div></div></div><br></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">Alexey Samsonov<br><a href="mailto:vonosmas@gmail.com" target="_blank">vonosmas@gmail.com</a></div></div>
</div></div>