diff options
| author | John McCall <rjmccall@apple.com> | 2012-09-25 08:00:39 +0000 |
|---|---|---|
| committer | John McCall <rjmccall@apple.com> | 2012-09-25 08:00:39 +0000 |
| commit | 0f999f329c67e5322b7659990a0f65436c7a97b6 (patch) | |
| tree | a73adc4e3f8ca948bb22ab34edcfb46c198ce75b /clang/test/CodeGenCXX/microsoft-abi-constructors.cpp | |
| parent | bf4a7d7193107aa81b0d7400403b4a766e8076db (diff) | |
| download | bcm5719-llvm-0f999f329c67e5322b7659990a0f65436c7a97b6.tar.gz bcm5719-llvm-0f999f329c67e5322b7659990a0f65436c7a97b6.zip | |
In the MS ABI, ctors return 'this'. Patch by Dmitry Sokolov.
llvm-svn: 164592
Diffstat (limited to 'clang/test/CodeGenCXX/microsoft-abi-constructors.cpp')
| -rw-r--r-- | clang/test/CodeGenCXX/microsoft-abi-constructors.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/clang/test/CodeGenCXX/microsoft-abi-constructors.cpp b/clang/test/CodeGenCXX/microsoft-abi-constructors.cpp index ac27f13308d..467f4174b7b 100644 --- a/clang/test/CodeGenCXX/microsoft-abi-constructors.cpp +++ b/clang/test/CodeGenCXX/microsoft-abi-constructors.cpp @@ -9,13 +9,17 @@ class A { void no_contstructor_destructor_infinite_recursion() { A a; -// Make sure that the constructor doesn't call itself: -// CHECK: define {{.*}} @"\01??0A@@QAE@XZ" -// CHECK-NOT: call void @"\01??0A@@QAE@XZ" -// CHECK: ret +// CHECK: define linkonce_odr x86_thiscallcc %class.A* @"\01??0A@@QAE@XZ"(%class.A* %this) +// CHECK-NEXT: entry: +// CHECK-NEXT: %this.addr = alloca %class.A*, align 4 +// CHECK-NEXT: store %class.A* %this, %class.A** %this.addr, align 4 +// CHECK-NEXT: %this1 = load %class.A** %this.addr +// CHECK-NEXT: ret %class.A* %this1 +// CHECK-NEXT: } // Make sure that the destructor doesn't call itself: // CHECK: define {{.*}} @"\01??1A@@QAE@XZ" // CHECK-NOT: call void @"\01??1A@@QAE@XZ" // CHECK: ret } + |

