diff options
| author | Douglas Gregor <dgregor@apple.com> | 2013-01-31 05:50:40 +0000 |
|---|---|---|
| committer | Douglas Gregor <dgregor@apple.com> | 2013-01-31 05:50:40 +0000 |
| commit | 6153500517fb6ac67eafa65407fd6dea37a2712b (patch) | |
| tree | 3aa2349ce67e680cc7d551a310f7445d8f304764 /clang/test/CodeGenCXX | |
| parent | 006039cc7479acf1303d9bf5c583eb90a04bdf38 (diff) | |
| download | bcm5719-llvm-6153500517fb6ac67eafa65407fd6dea37a2712b.tar.gz bcm5719-llvm-6153500517fb6ac67eafa65407fd6dea37a2712b.zip | |
When we're emitting a constructor or destructor call from a delegating
constructor, retrieve our VTT parameter directly. Fixes PR14588 /
<rdar://problem/12867962>.
llvm-svn: 174042
Diffstat (limited to 'clang/test/CodeGenCXX')
| -rw-r--r-- | clang/test/CodeGenCXX/cxx0x-delegating-ctors.cpp | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/cxx0x-delegating-ctors.cpp b/clang/test/CodeGenCXX/cxx0x-delegating-ctors.cpp index 338159cd825..de739d0ad8f 100644 --- a/clang/test/CodeGenCXX/cxx0x-delegating-ctors.cpp +++ b/clang/test/CodeGenCXX/cxx0x-delegating-ctors.cpp @@ -65,3 +65,37 @@ namespace PR12890 { } // CHECK: define {{.*}} @_ZN7PR128901XC1Ei(%"class.PR12890::X"* %this, i32) // CHECK: call void @llvm.memset.p0i8.{{i32|i64}}(i8* {{.*}}, i8 0, {{i32|i64}} 4, i32 4, i1 false) + +namespace PR14588 { + void other(); + + class Base { + public: + Base() { squawk(); } + virtual ~Base() {} + + virtual void squawk() { other(); } + }; + + + class Foo : public virtual Base { + public: + Foo(); + Foo(const void * inVoid); + virtual ~Foo() {} + + virtual void squawk() { other(); } + }; + + // CHECK: define void @_ZN7PR145883FooC1Ev(%"class.PR14588::Foo"* + // CHECK: call void @_ZN7PR145883FooC1EPKv( + // CHECK: invoke void @_ZN7PR145885otherEv() + // CHECK: call void @_ZN7PR145883FooD1Ev + // CHECK: resume + + Foo::Foo() : Foo(__null) { other(); } + Foo::Foo(const void *inVoid) { + squawk(); + } + +} |

