xref: /minix3/external/bsd/llvm/dist/clang/test/CodeGen/2008-07-31-asm-labels.c (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -emit-llvm -o %t %s
2*f4a2713aSLionel Sambuc // RUN: not grep "@pipe()" %t
3*f4a2713aSLionel Sambuc // RUN: grep '_thisIsNotAPipe' %t | count 3
4*f4a2713aSLionel Sambuc // RUN: not grep 'g0' %t
5*f4a2713aSLionel Sambuc // RUN: grep '_renamed' %t | count 2
6*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -DUSE_DEF -emit-llvm -o %t %s
7*f4a2713aSLionel Sambuc // RUN: not grep "@pipe()" %t
8*f4a2713aSLionel Sambuc // RUN: grep '_thisIsNotAPipe' %t | count 3
9*f4a2713aSLionel Sambuc // <rdr://6116729>
10*f4a2713aSLionel Sambuc 
11*f4a2713aSLionel Sambuc void pipe() asm("_thisIsNotAPipe");
12*f4a2713aSLionel Sambuc 
f0()13*f4a2713aSLionel Sambuc void f0() {
14*f4a2713aSLionel Sambuc   pipe();
15*f4a2713aSLionel Sambuc }
16*f4a2713aSLionel Sambuc 
17*f4a2713aSLionel Sambuc void pipe(int);
18*f4a2713aSLionel Sambuc 
f1()19*f4a2713aSLionel Sambuc void f1() {
20*f4a2713aSLionel Sambuc   pipe(1);
21*f4a2713aSLionel Sambuc }
22*f4a2713aSLionel Sambuc 
23*f4a2713aSLionel Sambuc #ifdef USE_DEF
pipe(int arg)24*f4a2713aSLionel Sambuc void pipe(int arg) {
25*f4a2713aSLionel Sambuc   int x = 10;
26*f4a2713aSLionel Sambuc }
27*f4a2713aSLionel Sambuc #endif
28*f4a2713aSLionel Sambuc 
29*f4a2713aSLionel Sambuc // PR3698
30*f4a2713aSLionel Sambuc extern int g0 asm("_renamed");
f2()31*f4a2713aSLionel Sambuc int f2() {
32*f4a2713aSLionel Sambuc   return g0;
33*f4a2713aSLionel Sambuc }
34