mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-25 08:16:05 +00:00

For MSVC compatibility, add the `__emit' builtin. This is used in the Windows SDK headers, and must therefore be implemented as a builtin rather than an intrinsic. The `__emit' builtin provides a mechanism to emit a 16-bit opcode instruction into the stream. The value must be a compile time constant expression. No guarantees are made about the CPU and memory states after the execution of the instruction. Due to the unchecked nature of the builtin, only support this on Windows on ARM. llvm-svn: 224438
7 lines
201 B
C
7 lines
201 B
C
// RUN: %clang_cc1 -triple thumbv7-windows -fms-extensions -verify %s
|
|
|
|
void emit_error(unsigned int opcode) {
|
|
__emit(opcode); // expected-error {{argument to '__emit' must be a constant integer}}
|
|
}
|
|
|