diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2012-12-02 13:20:44 +0000 | 
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2012-12-02 13:20:44 +0000 | 
| commit | 13cc256e404620c1de0cbcc4e43ce1e2dbbc4898 (patch) | |
| tree | 2732d02d7d51218d6eed98ac7fcfc5b8794896b5 /test/CodeGenCXX/thunks.cpp | |
| parent | 657bc3d9848e3be92029b2416031340988cd0111 (diff) | |
Diffstat (limited to 'test/CodeGenCXX/thunks.cpp')
| -rw-r--r-- | test/CodeGenCXX/thunks.cpp | 45 | 
1 files changed, 43 insertions, 2 deletions
diff --git a/test/CodeGenCXX/thunks.cpp b/test/CodeGenCXX/thunks.cpp index 04d0820da7a3..0659259c1799 100644 --- a/test/CodeGenCXX/thunks.cpp +++ b/test/CodeGenCXX/thunks.cpp @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 %s -triple=x86_64-pc-linux-gnu -emit-llvm -o - | FileCheck %s -// RUN: %clang_cc1 %s -triple=x86_64-pc-linux-gnu -fhidden-weak-vtables -emit-llvm -o - | FileCheck -check-prefix=HIDDEN %s +// RUN: %clang_cc1 %s -triple=x86_64-pc-linux-gnu -munwind-tables -emit-llvm -o - | FileCheck %s +// RUN: %clang_cc1 %s -triple=x86_64-pc-linux-gnu -munwind-tables -fhidden-weak-vtables -emit-llvm -o - | FileCheck -check-prefix=HIDDEN %s  namespace Test1 { @@ -301,6 +301,47 @@ namespace Test12 {    // CHECK: getelementptr inbounds i8* {{.*}}, i64 8  } +// PR13832 +namespace Test13 { +  struct B1 { +    virtual B1 &foo1(); +  }; +  struct Pad1 { +    virtual ~Pad1(); +  }; +  struct Proxy1 : Pad1, B1 { +    virtual ~Proxy1(); +  }; +  struct D : virtual Proxy1 { +    virtual ~D(); +    virtual D &foo1(); +  }; +  D& D::foo1() { +    return *this; +  } +  // CHECK: define {{.*}} @_ZTcvn8_n32_v8_n24_N6Test131D4foo1Ev +  // CHECK: getelementptr inbounds i8* {{.*}}, i64 -8 +  // CHECK: getelementptr inbounds i8* {{.*}}, i64 -32 +  // CHECK: getelementptr inbounds i8* {{.*}}, i64 -24 +  // CHECK: getelementptr inbounds i8* {{.*}}, i64 8 +  // CHECK: ret %"struct.Test13::D"* +} + +namespace Test14 { +  class A { +    virtual void f(); +  }; +  class B { +    virtual void f(); +  }; +  class C : public A, public B  { +    virtual void f(); +  }; +  void C::f() { +  } +  // CHECK: define void @_ZThn8_N6Test141C1fEv({{.*}}) {{.*}} uwtable +} +  /**** The following has to go at the end of the file ****/  // This is from Test5:  | 
