summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen/ms-inline-asm.cpp
diff options
context:
space:
mode:
authorChad Rosier <mcrosier@apple.com>2013-04-11 23:57:29 +0000
committerChad Rosier <mcrosier@apple.com>2013-04-11 23:57:29 +0000
commit766d0dea11a7d47750d128c398f0c8e6c741d855 (patch)
tree22e9bc90b60a7b747a74f098f2540cbf570ff9ee /clang/test/CodeGen/ms-inline-asm.cpp
parentb67f80571b65695ce7e396483651daf28d7d3769 (diff)
downloadbcm5719-llvm-766d0dea11a7d47750d128c398f0c8e6c741d855.tar.gz
bcm5719-llvm-766d0dea11a7d47750d128c398f0c8e6c741d855.zip
Add test case for r179343.
llvm-svn: 179344
Diffstat (limited to 'clang/test/CodeGen/ms-inline-asm.cpp')
-rw-r--r--clang/test/CodeGen/ms-inline-asm.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/clang/test/CodeGen/ms-inline-asm.cpp b/clang/test/CodeGen/ms-inline-asm.cpp
index 7e11700e1a9..99071aa81ca 100644
--- a/clang/test/CodeGen/ms-inline-asm.cpp
+++ b/clang/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.
+}
OpenPOWER on IntegriCloud