xref: /llvm-project/clang/test/CodeGen/thinlto-inline-asm.c (revision 46b0d0eef9e0a7290851cce0d44002b750584f1b)
1 // REQUIRES: x86-registered-target
2 
3 // RUN: %clang_cc1 -triple x86_64-pc-windows-msvc19.11.0 -emit-llvm-bc \
4 // RUN:   -flto=thin -mllvm -x86-asm-syntax=intel -v \
5 // RUN:   -o %t.obj %s 2>&1 | FileCheck --check-prefix=CLANG %s
6 //
7 // RUN: llvm-lto2 dump-symtab %t.obj | FileCheck --check-prefix=SYMTAB %s
8 
9 // Module-level inline asm is parsed with At&t syntax. Test that the
10 // -x86-asm-syntax flag does not affect this.
11 
12 // CLANG-NOT: unknown token in expression
13 // SYMTAB: D------X foo
14 // SYMTAB: D------X bar
15 
foo(void)16 void foo(void) {}
17 
18 asm(".globl bar      \n"
19     "bar:            \n"
20     "  xor %eax, %eax\n"
21     "  ret           \n");
22