diff options
| author | Nico Weber <nicolasweber@gmx.de> | 2014-05-06 03:13:27 +0000 |
|---|---|---|
| committer | Nico Weber <nicolasweber@gmx.de> | 2014-05-06 03:13:27 +0000 |
| commit | 30dabc00de4fe230663702ebfbf415084075ba68 (patch) | |
| tree | ff020a716049163bb3c3ebbef012a3ee3b9056ec /test/CodeGen/ms-inline-asm.cpp | |
| parent | 0d2d8fd82ae530360cac9a554ec8a0cf91be8381 (diff) | |
| download | clang-30dabc00de4fe230663702ebfbf415084075ba68.tar.gz clang-30dabc00de4fe230663702ebfbf415084075ba68.tar.bz2 clang-30dabc00de4fe230663702ebfbf415084075ba68.tar.xz | |
Support field references to struct names and c++11 aliases from inline asm.
This is in addition to the existing support for typedefs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@208053 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/ms-inline-asm.cpp')
| -rw-r--r-- | test/CodeGen/ms-inline-asm.cpp | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/test/CodeGen/ms-inline-asm.cpp b/test/CodeGen/ms-inline-asm.cpp index b1c13e57f1..83fe1075af 100644 --- a/test/CodeGen/ms-inline-asm.cpp +++ b/test/CodeGen/ms-inline-asm.cpp @@ -1,5 +1,5 @@ // REQUIRES: x86-registered-target -// RUN: %clang_cc1 -x c++ %s -triple i386-apple-darwin10 -fasm-blocks -emit-llvm -o - | FileCheck %s +// RUN: %clang_cc1 -x c++ %s -triple i386-apple-darwin10 -fasm-blocks -emit-llvm -o - -std=c++11 | FileCheck %s // rdar://13645930 @@ -111,3 +111,33 @@ void test6() { jmp a } } + +void t7_struct() { + struct A { + int a; + int b; + }; + __asm mov eax, [eax].A.b + // CHECK-LABEL: define void @_Z9t7_structv + // CHECK: call void asm sideeffect inteldialect "mov eax, [eax].4", "~{eax},~{dirflag},~{fpsr},~{flags}"() +} + +void t7_typedef() { + typedef struct { + int a; + int b; + } A; + __asm mov eax, [eax].A.b + // CHECK-LABEL: define void @_Z10t7_typedefv + // CHECK: call void asm sideeffect inteldialect "mov eax, [eax].4", "~{eax},~{dirflag},~{fpsr},~{flags}"() +} + +void t7_using() { + using A = struct { + int a; + int b; + }; + __asm mov eax, [eax].A.b + // CHECK-LABEL: define void @_Z8t7_usingv + // CHECK: call void asm sideeffect inteldialect "mov eax, [eax].4", "~{eax},~{dirflag},~{fpsr},~{flags}"() +} |
