r179344 - Add test case for r179343.
Chad Rosier
mcrosier at apple.com
Thu Apr 11 16:57:29 PDT 2013
Author: mcrosier
Date: Thu Apr 11 18:57:29 2013
New Revision: 179344
URL: http://llvm.org/viewvc/llvm-project?rev=179344&view=rev
Log:
Add test case for r179343.
Modified:
cfe/trunk/test/CodeGen/ms-inline-asm.cpp
Modified: cfe/trunk/test/CodeGen/ms-inline-asm.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/ms-inline-asm.cpp?rev=179344&r1=179343&r2=179344&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/ms-inline-asm.cpp (original)
+++ cfe/trunk/test/CodeGen/ms-inline-asm.cpp Thu Apr 11 18:57:29 2013
@@ -4,8 +4,10 @@
struct Foo {
static int *ptr;
static int a, b;
+ int arr[4];
struct Bar {
static int *ptr;
+ char arr[2];
};
};
@@ -34,3 +36,23 @@ void t2() {
// CHECK: call void asm sideeffect inteldialect "mov eax, Foo::ptr", "~{eax},~{dirflag},~{fpsr},~{flags}"()
// CHECK: call void asm sideeffect inteldialect "mov eax, Foo::Bar::ptr", "~{eax},~{dirflag},~{fpsr},~{flags}"()
}
+
+void t3() {
+ __asm mov eax, LENGTH Foo::ptr
+ __asm mov eax, LENGTH Foo::Bar::ptr
+ __asm mov eax, LENGTH Foo::arr
+ __asm mov eax, LENGTH Foo::Bar::arr
+
+ __asm mov eax, TYPE Foo::ptr
+ __asm mov eax, TYPE Foo::Bar::ptr
+ __asm mov eax, TYPE Foo::arr
+ __asm mov eax, TYPE Foo::Bar::arr
+
+ __asm mov eax, SIZE Foo::ptr
+ __asm mov eax, SIZE Foo::Bar::ptr
+ __asm mov eax, SIZE Foo::arr
+ __asm mov eax, SIZE Foo::Bar::arr
+// CHECK: t3
+// FIXME: These tests just make sure we can parse things properly.
+// Additional work needs to be done in Sema to perform the lookup.
+}
More information about the cfe-commits
mailing list