summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen
diff options
context:
space:
mode:
authorChad Rosier <mcrosier@apple.com>2012-08-16 22:25:38 +0000
committerChad Rosier <mcrosier@apple.com>2012-08-16 22:25:38 +0000
commit3d4b98b4bc8e9bd021df90ade897017d87b663a0 (patch)
treebdda4f06f9ae0687d7f39f51e5d59d49e960505e /clang/test/CodeGen
parent2c4ca0fa7d1391396089e5f3ef6ac547dd304fd1 (diff)
downloadbcm5719-llvm-3d4b98b4bc8e9bd021df90ade897017d87b663a0.tar.gz
bcm5719-llvm-3d4b98b4bc8e9bd021df90ade897017d87b663a0.zip
[ms-inline asm] Add a helper function, isMSAsmKeyword().
These require special handling, which we don't currently handle. This is being put in place to ensure we don't do invalid symbol table lookups or try to parse invalid assembly. The test cases just makes sure the latter isn't happening. llvm-svn: 162050
Diffstat (limited to 'clang/test/CodeGen')
-rw-r--r--clang/test/CodeGen/ms-inline-asm.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/clang/test/CodeGen/ms-inline-asm.c b/clang/test/CodeGen/ms-inline-asm.c
index 310fbd1e008..c140d60551d 100644
--- a/clang/test/CodeGen/ms-inline-asm.c
+++ b/clang/test/CodeGen/ms-inline-asm.c
@@ -98,3 +98,23 @@ unsigned t11(void) {
// CHECK: [[RET:%[a-zA-Z0-9]+]] = load i32* [[J]], align 4
// CHECK: ret i32 [[RET]]
}
+
+void t12(void) {
+ __asm EVEN
+ __asm ALIGN
+}
+
+void t13(void) {
+ __asm {
+ _emit 0x4A
+ _emit 0x43
+ _emit 0x4B
+ }
+}
+
+void t14(void) {
+ unsigned arr[10];
+ __asm LENGTH arr ; sizeof(arr)/sizeof(arr[0])
+ __asm SIZE arr ; sizeof(arr)
+ __asm TYPE arr ; sizeof(arr[0])
+}
OpenPOWER on IntegriCloud