Clang Project

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