diff options
author | Xinliang David Li <davidxl@google.com> | 2016-02-07 20:06:36 +0000 |
---|---|---|
committer | Xinliang David Li <davidxl@google.com> | 2016-02-07 20:06:36 +0000 |
commit | cbbc8988e2ca74ff994d22025183cb6d7b2b0001 (patch) | |
tree | ea02a0531bf6d2123cc34d452041fc25d49f9313 /test/profile | |
parent | d2d2484c438547cc81a029415febd4dad041691a (diff) |
Revert 260050 -- new test case should not be included
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@260051 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/profile')
-rw-r--r-- | test/profile/Linux/coverage_assignop.cpp | 42 | ||||
-rw-r--r-- | test/profile/Linux/coverage_ctors.cpp | 5 | ||||
-rw-r--r-- | test/profile/Linux/coverage_dtor.cpp | 5 |
3 files changed, 6 insertions, 46 deletions
diff --git a/test/profile/Linux/coverage_assignop.cpp b/test/profile/Linux/coverage_assignop.cpp deleted file mode 100644 index ea78de78a..000000000 --- a/test/profile/Linux/coverage_assignop.cpp +++ /dev/null @@ -1,42 +0,0 @@ -// RUN: %clang_profgen -x c++ -std=c++11 -fuse-ld=gold -fcoverage-mapping -o %t %s -// RUN: env LLVM_PROFILE_FILE=%t.profraw %run %t -// RUN: llvm-profdata merge -o %t.profdata %t.profraw -// RUN: llvm-cov show %t -instr-profile %t.profdata -filename-equivalence 2>&1 | FileCheck %s -struct Base1 { - int B; - Base1(int b) : B(b) {} - void operator=(const struct Base1 &b) { B = b.B + 1; } -}; - -struct Base2 { - int B; - Base2(int b) : B(b) {} - void operator=(const struct Base2 &b) { B = b.B; } -}; - -struct Derived1 : public Base1 { - Derived1() : Base1(10) {} - Derived1(int B) : Base1(B) {} - Derived1 &operator=(const Derived1 &) = default; // CHECK: 2| [[@LINE]]| Derived1 &operator=(const Derived1 &) = default; -}; - -struct Derived2 : public Derived1, public Base2 { - Derived2() : Derived1(20), Base2(30) {} - Derived2(int B1, int B2) : Derived1(B1), Base2(B2) {} - Derived2 &operator=(const Derived2 &) = default; // CHECK: 1| [[@LINE]]| Derived2 &operator=(const Derived2 &) = default; -}; - -Derived1 d1(1); -Derived2 d2(2, 3); - -int main() { - Derived1 ld1; - Derived2 ld2; - Derived2 ld22; - ld1 = d1; - ld2 = d2; - if (ld1.B != 2 || ld2.Base1::B != 3 || ld2.Base2::B != 3 || - ld22.Base1::B != 20 || ld22.Base2::B != 30) - return 1; - return 0; -} diff --git a/test/profile/Linux/coverage_ctors.cpp b/test/profile/Linux/coverage_ctors.cpp index cb8b12078..336cf147c 100644 --- a/test/profile/Linux/coverage_ctors.cpp +++ b/test/profile/Linux/coverage_ctors.cpp @@ -15,9 +15,10 @@ struct Base { }; struct Derived : public Base { - Derived(const Derived &) = default; // CHECK: 2| [[@LINE]]| Derived(const Derived &) = default; - Derived() = default; // CHECK: 1| [[@LINE]]| Derived() = default + Derived(const Derived &) = default; // CHECK: 2| [[@LINE]]| Derived + Derived() = default; // CHECK: 1| [[@LINE]]| Derived int I; + int J; int getI() { return I; } }; diff --git a/test/profile/Linux/coverage_dtor.cpp b/test/profile/Linux/coverage_dtor.cpp index 8a4a039be..b24bfb8a4 100644 --- a/test/profile/Linux/coverage_dtor.cpp +++ b/test/profile/Linux/coverage_dtor.cpp @@ -10,9 +10,10 @@ struct Base { }; struct Derived : public Base { - Derived(int K) : Base(K), I(K) {} - ~Derived() = default; // CHECK: 2| [[@LINE]]| ~Derived() = default; + Derived(int K) : Base(K), I(K), J(K) {} + ~Derived() = default; // CHECK: 2| [[@LINE]]| ~Derived int I; + int J; int getI() { return I; } }; |