From 5e768cad6a660d439f1a19c06b423bed30f91f97 Mon Sep 17 00:00:00 2001 From: Chad Rosier Date: Thu, 11 Apr 2013 23:57:29 +0000 Subject: [PATCH] Add test case for r179343. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179344 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/CodeGen/ms-inline-asm.cpp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/test/CodeGen/ms-inline-asm.cpp b/test/CodeGen/ms-inline-asm.cpp index 7e11700e1a..99071aa81c 100644 --- a/test/CodeGen/ms-inline-asm.cpp +++ b/test/CodeGen/ms-inline-asm.cpp @@ -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. +} -- 2.40.0