xref: /llvm-project/clang/test/CodeGenCXX/inline-functions.cpp (revision ff76cb9727f016a580c45e7e6f86bc763d80b337)
1 // RUN: %clang_cc1 %s -triple=x86_64-apple-darwin10 -emit-llvm -o - | FileCheck %s
2 // CHECK: ; ModuleID
3 
4 struct A {
5     inline void f();
6 };
7 
8 // CHECK-NOT: define void @_ZN1A1fEv
9 void A::f() { }
10 
11 template<typename> struct B { };
12 
13 template<> struct B<char> {
14   inline void f();
15 };
16 
17 // CHECK-NOT: _ZN1BIcE1fEv
18 void B<char>::f() { }
19 
20 // We need a final CHECK line here.
21 
22 // CHECK: define void @_Z1fv
23 void f() { }
24 
25 // <rdar://problem/8740363>
26 inline void f1(int);
27 
28 // CHECK: define linkonce_odr void @_Z2f1i
29 void f1(int) { }
30 
31 void test_f1() { f1(17); }
32