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