]> granicus.if.org Git - clang/commitdiff
MS ABI: Make test introduced in r205217 more robust
authorDavid Majnemer <david.majnemer@gmail.com>
Mon, 31 Mar 2014 16:30:00 +0000 (16:30 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Mon, 31 Mar 2014 16:30:00 +0000 (16:30 +0000)
Don't assume any particular IR Value name, pattern match the names from
the GEP instructions instead.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@205218 91177308-0d34-0410-b5e6-96231b3b80d8

test/CodeGenCXX/microsoft-abi-sret-and-byval.cpp

index 216c6f28c24e6aa47c29e33d108bd0ee4a7bfd07..28b78b3dfe6e6b51c5d76f90698e95c5f50dd1b0 100644 (file)
@@ -277,9 +277,9 @@ struct ForwardDeclare1 {};
 void fn2() { fn1(0, SmallWithDtor()); };
 // WIN32-LABEL: define void @"\01?fn2@@YAXXZ"
 // WIN32:   %[[argmem:[^ ]*]] = alloca inalloca [[argmem_ty:<{ {}\*, %struct.SmallWithDtor }>]]
-// WIN32:   getelementptr inbounds [[argmem_ty]]* %[[argmem]], i32 0, i32 1
-// WIN32:   call x86_thiscallcc %struct.SmallWithDtor* @"\01??0SmallWithDtor@@QAE@XZ"(%struct.SmallWithDtor* %0)
-// WIN32:   getelementptr inbounds [[argmem_ty]]* %[[argmem]], i32 0, i32 0
-// WIN32:   %[[addr:[^ ]*]] = bitcast {}** %1 to void [[dst_ty:\(%struct.ForwardDeclare1\*\)\*]]*
+// WIN32:   %[[gep1:[^ ]*]] = getelementptr inbounds [[argmem_ty]]* %[[argmem]], i32 0, i32 1
+// WIN32:   call x86_thiscallcc %struct.SmallWithDtor* @"\01??0SmallWithDtor@@QAE@XZ"(%struct.SmallWithDtor* %[[gep1]])
+// WIN32:   %[[gep2:[^ ]*]] = getelementptr inbounds [[argmem_ty]]* %[[argmem]], i32 0, i32 0
+// WIN32:   %[[addr:[^ ]*]] = bitcast {}** %[[gep2]] to void [[dst_ty:\(%struct.ForwardDeclare1\*\)\*]]*
 // WIN32:   store void [[dst_ty]] null, void [[dst_ty]]* %[[addr]], align 4
 // WIN32:   call void @"\01?fn1@@YAXP6AXUForwardDeclare1@@@ZUSmallWithDtor@@@Z"([[argmem_ty]]* inalloca %[[argmem]])