From 924ce0d9aa8f5dca78cde7eee3f90eb3cb9be15f Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi Date: Tue, 25 Sep 2012 09:53:18 +0000 Subject: [PATCH] clang/test/CodeGenCXX/microsoft-*: Fix for -Asserts. llvm-svn: 164594 --- clang/test/CodeGenCXX/microsoft-abi-constructors.cpp | 9 ++++----- clang/test/CodeGenCXX/microsoft-abi-methods.cpp | 2 +- .../CodeGenCXX/microsoft-abi-static-initializers.cpp | 4 ++-- clang/test/CodeGenCXX/microsoft-interface.cpp | 12 ++++++------ 4 files changed, 13 insertions(+), 14 deletions(-) diff --git a/clang/test/CodeGenCXX/microsoft-abi-constructors.cpp b/clang/test/CodeGenCXX/microsoft-abi-constructors.cpp index 467f4174b7b5..89731ff38e97 100644 --- a/clang/test/CodeGenCXX/microsoft-abi-constructors.cpp +++ b/clang/test/CodeGenCXX/microsoft-abi-constructors.cpp @@ -10,11 +10,10 @@ void no_contstructor_destructor_infinite_recursion() { A a; // 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: [[THIS_ADDR:%[.0-9A-Z_a-z]+]] = alloca %class.A*, align 4 +// CHECK-NEXT: store %class.A* %this, %class.A** [[THIS_ADDR]], align 4 +// CHECK-NEXT: [[T1:%[.0-9A-Z_a-z]+]] = load %class.A** [[THIS_ADDR]] +// CHECK-NEXT: ret %class.A* [[T1]] // CHECK-NEXT: } // Make sure that the destructor doesn't call itself: diff --git a/clang/test/CodeGenCXX/microsoft-abi-methods.cpp b/clang/test/CodeGenCXX/microsoft-abi-methods.cpp index 6911bc2eecc9..c996ba5b8473 100644 --- a/clang/test/CodeGenCXX/microsoft-abi-methods.cpp +++ b/clang/test/CodeGenCXX/microsoft-abi-methods.cpp @@ -72,7 +72,7 @@ void constructors() { // Make sure that the Base constructor call in the Child constructor uses // the right calling convention: // CHECK: define linkonce_odr x86_thiscallcc %class.Child* @"\01??0Child@@QAE@XZ" -// CHECK: %call = call x86_thiscallcc %class.Base* @"\01??0Base@@QAE@XZ" +// CHECK: %{{[.0-9A-Z_a-z]+}} = call x86_thiscallcc %class.Base* @"\01??0Base@@QAE@XZ" // CHECK: ret // Make sure that the Base destructor call in the Child denstructor uses diff --git a/clang/test/CodeGenCXX/microsoft-abi-static-initializers.cpp b/clang/test/CodeGenCXX/microsoft-abi-static-initializers.cpp index 1ef4ace63c8d..448f1eeeb91f 100644 --- a/clang/test/CodeGenCXX/microsoft-abi-static-initializers.cpp +++ b/clang/test/CodeGenCXX/microsoft-abi-static-initializers.cpp @@ -6,7 +6,7 @@ struct S { } s; // CHECK: define internal void [[INIT_s:@.*global_var.*]] nounwind -// CHECK: %call = call x86_thiscallcc %struct.S* @"\01??0S@@QAE@XZ" +// CHECK: %{{[.0-9A-Z_a-z]+}} = call x86_thiscallcc %struct.S* @"\01??0S@@QAE@XZ" // CHECK: call i32 @atexit(void ()* @"__dtor_\01?s@@3US@@A") // CHECK: ret void @@ -34,7 +34,7 @@ void force_usage() { } // CHECK: define internal void [[INIT_foo:@.*global_var.*]] nounwind -// CHECK: %call = call x86_thiscallcc %class.A* @"\01??0A@@QAE@XZ" +// CHECK: %{{[.0-9A-Z_a-z]+}} = call x86_thiscallcc %class.A* @"\01??0A@@QAE@XZ" // CHECK: call i32 @atexit(void ()* [[FOO_DTOR:@"__dtor_.*foo@.*]]) // CHECK: ret void diff --git a/clang/test/CodeGenCXX/microsoft-interface.cpp b/clang/test/CodeGenCXX/microsoft-interface.cpp index 3887d18df1b7..0b44bab73854 100644 --- a/clang/test/CodeGenCXX/microsoft-interface.cpp +++ b/clang/test/CodeGenCXX/microsoft-interface.cpp @@ -21,23 +21,23 @@ int fn() { // CHECK: define i32 @_Z2fnv() // CHECK: call void @_ZN1SC1Ev(%struct.S* %s) -// CHECK: %call = call i32 @_ZN1S4testEv(%struct.S* %s) +// CHECK: %{{[.0-9A-Z_a-z]+}} = call i32 @_ZN1S4testEv(%struct.S* %s) // CHECK: define linkonce_odr void @_ZN1SC1Ev(%struct.S* %this) -// CHECK: call void @_ZN1SC2Ev(%struct.S* %this1) +// CHECK: call void @_ZN1SC2Ev(%struct.S* %{{[.0-9A-Z_a-z]+}}) // CHECK: define linkonce_odr i32 @_ZN1S4testEv(%struct.S* %this) -// CHECK: %call = call i32 @_ZN1I4testEv(%__interface.I* %0) +// CHECK: %{{[.0-9A-Z_a-z]+}} = call i32 @_ZN1I4testEv(%__interface.I* %{{[.0-9A-Z_a-z]+}}) // CHECK: define linkonce_odr i32 @_ZN1I4testEv(%__interface.I* %this) // CHECK: ret i32 1 // CHECK: define linkonce_odr void @_ZN1SC2Ev(%struct.S* %this) -// CHECK: call void @_ZN1IC2Ev(%__interface.I* %0) -// CHECK: store i8** getelementptr inbounds ([3 x i8*]* @_ZTV1S, i64 0, i64 2), i8*** %1 +// CHECK: call void @_ZN1IC2Ev(%__interface.I* %{{[.0-9A-Z_a-z]+}}) +// CHECK: store i8** getelementptr inbounds ([3 x i8*]* @_ZTV1S, i64 0, i64 2), i8*** %{{[.0-9A-Z_a-z]+}} // CHECK: define linkonce_odr void @_ZN1IC2Ev(%__interface.I* %this) -// CHECK: store i8** getelementptr inbounds ([3 x i8*]* @_ZTV1I, i64 0, i64 2), i8*** %0 +// CHECK: store i8** getelementptr inbounds ([3 x i8*]* @_ZTV1I, i64 0, i64 2), i8*** %{{[.0-9A-Z_a-z]+}} // CHECK-NOT: define linkonce_odr %__interface.I* @_ZN1IaSERKS_(%__interface.I* %this, %__interface.I*) // CHECK-NOT: define linkonce_odr %__interface.I* @_ZN1IaSEOS_(%__interface.I* %this, %__interface.I*)