diff options
author | Anders Carlsson <andersca@mac.com> | 2009-12-04 22:35:50 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2009-12-04 22:35:50 +0000 |
commit | 48eda2c5d6d2a5c95775a1a3a8a22428bb6869c6 (patch) | |
tree | ef374db0e826725721d861821245a029c8aa8222 /test/CodeGenCXX/inline-functions.cpp | |
parent | 99369081447e9b7b2c2f724d39e9ec8409291d08 (diff) |
Be a little more clever about inline member functions that are marked inline in the inline class declaration but not in the actual definition:
class A {
inline void f();
}
void A::f() { }
This is not the most ideal solution, since it doesn't work 100% with regular functions (as my FIXME comment states).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90607 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/inline-functions.cpp')
-rw-r--r-- | test/CodeGenCXX/inline-functions.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/test/CodeGenCXX/inline-functions.cpp b/test/CodeGenCXX/inline-functions.cpp new file mode 100644 index 0000000000..9af4c6e5be --- /dev/null +++ b/test/CodeGenCXX/inline-functions.cpp @@ -0,0 +1,23 @@ +// RUN: clang-cc %s -triple=x86_64-apple-darwin10 -emit-llvm -o - | FileCheck %s +// CHECK: ; ModuleID + +struct A { + inline void f(); +}; + +// CHECK-NOT: define void @_ZN1A1fEv +void A::f() { } + +template<typename> struct B { }; + +template<> struct B<char> { + inline void f(); +}; + +// CHECK-NOT: _ZN1BIcE1fEv +void B<char>::f() { } + +// We need a final CHECK line here. + +// CHECK: define void @_Z1fv +void f() { } |