diff options
author | dim <dim@FreeBSD.org> | 2015-05-27 18:47:56 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2015-05-27 18:47:56 +0000 |
commit | 3191b2b32a96e1a6ee833fcca73e5c8e0c67ba65 (patch) | |
tree | dbbd4047878da71c1a706e26ce05b4e7791b14cc /test/CodeGenCXX/microsoft-abi-thunks.cpp | |
parent | 38d6f2e7f2ce51a5b3836d26596c6c34a3288752 (diff) | |
download | FreeBSD-src-3191b2b32a96e1a6ee833fcca73e5c8e0c67ba65.zip FreeBSD-src-3191b2b32a96e1a6ee833fcca73e5c8e0c67ba65.tar.gz |
Vendor import of clang trunk r238337:
https://llvm.org/svn/llvm-project/cfe/trunk@238337
Diffstat (limited to 'test/CodeGenCXX/microsoft-abi-thunks.cpp')
-rw-r--r-- | test/CodeGenCXX/microsoft-abi-thunks.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/test/CodeGenCXX/microsoft-abi-thunks.cpp b/test/CodeGenCXX/microsoft-abi-thunks.cpp index 843bc89..8cbea5c 100644 --- a/test/CodeGenCXX/microsoft-abi-thunks.cpp +++ b/test/CodeGenCXX/microsoft-abi-thunks.cpp @@ -31,12 +31,12 @@ struct C : A, B { C(); virtual ~C(); - // MANGLING-DAG: @"\01??1C@@UAE@XZ" - // MANGLING-DAG: @"\01??_GC@@UAEPAXI@Z" - // MANGLING-DAG: @"\01??_EC@@W3AEPAXI@Z" - // MANGLING-X64-DAG: @"\01??1C@@UEAA@XZ" - // MANGLING-X64-DAG: @"\01??_GC@@UEAAPEAXI@Z" - // MANGLING-X64-DAG: @"\01??_EC@@W7EAAPEAXI@Z" + // MANGLING-DAG: declare {{.*}} @"\01??1C@@UAE@XZ"({{.*}}) + // MANGLING-DAG: define {{.*}} @"\01??_GC@@UAEPAXI@Z"({{.*}}) + // MANGLING-DAG: define {{.*}} @"\01??_EC@@W3AEPAXI@Z"({{.*}}) {{.*}} comdat + // MANGLING-X64-DAG: declare {{.*}} @"\01??1C@@UEAA@XZ"({{.*}}) + // MANGLING-X64-DAG: define {{.*}} @"\01??_GC@@UEAAPEAXI@Z"({{.*}}) + // MANGLING-X64-DAG: define {{.*}} @"\01??_EC@@W7EAAPEAXI@Z"({{.*}}) {{.*}} comdat // Overrides public_f() of two subobjects with distinct vfptrs, thus needs a thunk. virtual void public_f(); @@ -61,14 +61,14 @@ struct C : A, B { C::C() {} // Emits vftable and forces thunk generation. -// CODEGEN-LABEL: define linkonce_odr x86_thiscallcc i8* @"\01??_EC@@W3AEPAXI@Z"(%struct.C* %this, i32 %should_call_delete) -// CODEGEN: getelementptr i8* {{.*}}, i32 -4 +// CODEGEN-LABEL: define linkonce_odr x86_thiscallcc i8* @"\01??_EC@@W3AEPAXI@Z"(%struct.C* %this, i32 %should_call_delete) {{.*}} comdat +// CODEGEN: getelementptr i8, i8* {{.*}}, i32 -4 // FIXME: should actually call _EC, not _GC. // CODEGEN: call x86_thiscallcc i8* @"\01??_GC@@UAEPAXI@Z" // CODEGEN: ret // CODEGEN-LABEL: define linkonce_odr x86_thiscallcc void @"\01?public_f@C@@W3AEXXZ"(%struct.C* -// CODEGEN: getelementptr i8* {{.*}}, i32 -4 +// CODEGEN: getelementptr i8, i8* {{.*}}, i32 -4 // CODEGEN: call x86_thiscallcc void @"\01?public_f@C@@UAEXXZ"(%struct.C* // CODEGEN: ret @@ -93,7 +93,7 @@ E::E() {} // Emits vftable and forces thunk generation. // CODEGEN-LABEL: define weak_odr x86_thiscallcc %struct.C* @"\01?goo@E@@QAEPAUB@@XZ" // CODEGEN: call x86_thiscallcc %struct.C* @"\01?goo@E@@UAEPAUC@@XZ" -// CODEGEN: getelementptr inbounds i8* {{.*}}, i32 4 +// CODEGEN: getelementptr inbounds i8, i8* {{.*}}, i32 4 // CODEGEN: ret struct F : virtual A, virtual B { @@ -127,12 +127,12 @@ I::I() {} // Emits vftable and forces thunk generation. // CODEGEN-LABEL: define weak_odr x86_thiscallcc %struct.{{[BF]}}* @"\01?goo@I@@QAEPAUB@@XZ" // CODEGEN: %[[ORIG_RET:.*]] = call x86_thiscallcc %struct.F* @"\01?goo@I@@UAEPAUF@@XZ" // CODEGEN: %[[ORIG_RET_i8:.*]] = bitcast %struct.F* %[[ORIG_RET]] to i8* -// CODEGEN: %[[VBPTR_i8:.*]] = getelementptr inbounds i8* %[[ORIG_RET_i8]], i32 4 +// CODEGEN: %[[VBPTR_i8:.*]] = getelementptr inbounds i8, i8* %[[ORIG_RET_i8]], i32 4 // CODEGEN: %[[VBPTR:.*]] = bitcast i8* %[[VBPTR_i8]] to i32** -// CODEGEN: %[[VBTABLE:.*]] = load i32** %[[VBPTR]] -// CODEGEN: %[[VBASE_OFFSET_PTR:.*]] = getelementptr inbounds i32* %[[VBTABLE]], i32 2 -// CODEGEN: %[[VBASE_OFFSET:.*]] = load i32* %[[VBASE_OFFSET_PTR]] -// CODEGEN: %[[RES_i8:.*]] = getelementptr inbounds i8* %[[VBPTR_i8]], i32 %[[VBASE_OFFSET]] +// CODEGEN: %[[VBTABLE:.*]] = load i32*, i32** %[[VBPTR]] +// CODEGEN: %[[VBASE_OFFSET_PTR:.*]] = getelementptr inbounds i32, i32* %[[VBTABLE]], i32 2 +// CODEGEN: %[[VBASE_OFFSET:.*]] = load i32, i32* %[[VBASE_OFFSET_PTR]] +// CODEGEN: %[[RES_i8:.*]] = getelementptr inbounds i8, i8* %[[VBPTR_i8]], i32 %[[VBASE_OFFSET]] // CODEGEN: %[[RES:.*]] = bitcast i8* %[[RES_i8]] to %struct.F* // CODEGEN: phi %struct.F* {{.*}} %[[RES]] // CODEGEN: ret %struct.{{[BF]}}* |