xref: /aosp_15_r20/external/clang/test/Tooling/ms-asm-no-target.cpp (revision 67e74705e28f6214e480b399dd47ea732279e315)
1*67e74705SXin Li // RUN: clang-check "%s" -- -fasm-blocks -target x86_64-apple-darwin10 2>&1 | FileCheck -check-prefix=CHECK-X86 %s -allow-empty
2*67e74705SXin Li // RUN: not clang-check "%s" -- -fasm-blocks -target powerpc-apple-darwin10 2>&1 | FileCheck -check-prefix=CHECK-PPC %s
3*67e74705SXin Li // REQUIRES: x86-registered-target
4*67e74705SXin Li 
Break()5*67e74705SXin Li void Break() {
6*67e74705SXin Li   __asm { int 3 }
7*67e74705SXin Li }
8*67e74705SXin Li 
9*67e74705SXin Li // clang-check should initialize the x86 target, so x86 should work.
10*67e74705SXin Li // CHECK-X86-NOT: error: MS-style inline assembly is not available
11*67e74705SXin Li 
12*67e74705SXin Li // Test that the ordinary error is emitted on unsupported architectures.
13*67e74705SXin Li // CHECK-PPC: error: Unsupported architecture 'powerpc' for MS-style inline assembly
14