1 // RUN: %clang_cc1 -triple i386-pc-linux-gnu -emit-llvm -o - %s | FileCheck %s
5 // Make sure we mangle overloadable, even in C system headers.
6 # 1 "somesystemheader.h" 1 3 4
8 void __attribute__((__overloadable__
)) f0(int a
) {}
10 void __attribute__((__overloadable__
)) f0(long b
) {}
12 // Unless it's unmarked.
18 // These should get merged.
19 void foo() __asm__("bar");
20 void foo2() __asm__("bar");
22 int nux
__asm__("foo");
23 extern float nux2
__asm__("foo");
33 // Function becomes a variable.
34 void foo3() __asm__("var");
39 int foo4
__asm__("var") = 4;
42 // Variable becomes a function
43 extern int foo5
__asm__("var2");
49 void foo6() __asm__("var2");
55 int foo7
__asm__("foo7") __attribute__((used
));
56 float foo8
__asm__("foo7") = 42;
60 extern int func (void) __asm__ ("FUNC");
67 // CHECK: @_Z4foo9Dv4_f
68 typedef __attribute__(( vector_size(16) )) float float4
;
69 void __attribute__((__overloadable__
)) foo9(float4 f
) {}
72 extern int llvm_cas(volatile int*, int, int)
73 __asm__("llvm.atomic.cmp.swap.i32.p0i32");
75 int foo10(volatile int* add
, int from
, int to
) {
76 // CHECK: call i32 @llvm.atomic.cmp.swap.i32.p0
77 return llvm_cas(add
, from
, to
);