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