diff options
| author | John McCall <rjmccall@apple.com> | 2010-02-19 01:32:20 +0000 | 
|---|---|---|
| committer | John McCall <rjmccall@apple.com> | 2010-02-19 01:32:20 +0000 | 
| commit | d4324148d70f064842c74fedf3cda2234eda915e (patch) | |
| tree | c28a50be7680d037fe8978afa328fe7e767ac423 /clang/test | |
| parent | 5481d329a3441bf45b16402bfead8d6665cf7937 (diff) | |
| download | bcm5719-llvm-d4324148d70f064842c74fedf3cda2234eda915e.tar.gz bcm5719-llvm-d4324148d70f064842c74fedf3cda2234eda915e.zip  | |
Re-introduce the ctor/dtor alias optimization, this time hidden behind a
command-line option which defaults off.
llvm-svn: 96649
Diffstat (limited to 'clang/test')
| -rw-r--r-- | clang/test/CodeGenCXX/virtual-bases.cpp | 4 | ||||
| -rw-r--r-- | clang/test/CodeGenCXX/virtual-destructor-calls.cpp | 7 | ||||
| -rw-r--r-- | clang/test/CodeGenCXX/vtable-pointer-initialization.cpp | 4 | 
3 files changed, 7 insertions, 8 deletions
diff --git a/clang/test/CodeGenCXX/virtual-bases.cpp b/clang/test/CodeGenCXX/virtual-bases.cpp index 200f21a5da7..62771757630 100644 --- a/clang/test/CodeGenCXX/virtual-bases.cpp +++ b/clang/test/CodeGenCXX/virtual-bases.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -emit-llvm %s -o - -triple=x86_64-apple-darwin10 | FileCheck %s +// RUN: %clang_cc1 -emit-llvm %s -o - -triple=x86_64-apple-darwin10 -mconstructor-aliases | FileCheck %s  struct A {     A();  }; -// CHECK: define void @_ZN1AC1Ev(%struct.A* %this) +// CHECK: @_ZN1AC1Ev = alias {{.*}} @_ZN1AC2Ev  // CHECK: define void @_ZN1AC2Ev(%struct.A* %this)  A::A() { } diff --git a/clang/test/CodeGenCXX/virtual-destructor-calls.cpp b/clang/test/CodeGenCXX/virtual-destructor-calls.cpp index 0a10fd138f8..91fd598d4c9 100644 --- a/clang/test/CodeGenCXX/virtual-destructor-calls.cpp +++ b/clang/test/CodeGenCXX/virtual-destructor-calls.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -emit-llvm %s -o - -triple=x86_64-apple-darwin10 | FileCheck %s +// RUN: %clang_cc1 -emit-llvm %s -o - -triple=x86_64-apple-darwin10 -mconstructor-aliases | FileCheck %s  struct A {    virtual ~A(); @@ -8,9 +8,8 @@ struct B : A {    virtual ~B();  }; -// Complete dtor: just defers to base dtor because there are no vbases. -// CHECK: define void @_ZN1BD1Ev -// CHECK: call void @_ZN1BD2Ev +// Complete dtor: just an alias because there are no virtual bases. +// CHECK: @_ZN1BD1Ev = alias {{.*}} @_ZN1BD2Ev  // Deleting dtor: defers to the complete dtor.  // CHECK: define void @_ZN1BD0Ev diff --git a/clang/test/CodeGenCXX/vtable-pointer-initialization.cpp b/clang/test/CodeGenCXX/vtable-pointer-initialization.cpp index 92e011752f3..ebe531529b8 100644 --- a/clang/test/CodeGenCXX/vtable-pointer-initialization.cpp +++ b/clang/test/CodeGenCXX/vtable-pointer-initialization.cpp @@ -19,14 +19,14 @@ struct A : Base {    Field field;  }; -// CHECK: define void @_ZN1AC1Ev( +// CHECK: define void @_ZN1AC2Ev(  // CHECK: call void @_ZN4BaseC2Ev(  // CHECK: store i8** getelementptr inbounds ([3 x i8*]* @_ZTV1A, i64 0, i64 2)  // CHECK: call void @_ZN5FieldC1Ev(  // CHECK: ret void  A::A() { } -// CHECK: define void @_ZN1AD1Ev( +// CHECK: define void @_ZN1AD2Ev(  // CHECK: store i8** getelementptr inbounds ([3 x i8*]* @_ZTV1A, i64 0, i64 2)  // CHECK: call void @_ZN5FieldD1Ev(  // CHECK: call void @_ZN4BaseD2Ev(  | 

