summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCXX/inline-functions.cpp
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2009-12-04 22:35:50 +0000
committerAnders Carlsson <andersca@mac.com>2009-12-04 22:35:50 +0000
commitcfb65d743217c02f68e3131cce011f08b2446213 (patch)
tree307ed34df38f417b8f544e05eea94c1ebc053b22 /clang/test/CodeGenCXX/inline-functions.cpp
parent1ed86de0800f2ef399ba1f01bdbe015dbba76a78 (diff)
downloadbcm5719-llvm-cfb65d743217c02f68e3131cce011f08b2446213.tar.gz
bcm5719-llvm-cfb65d743217c02f68e3131cce011f08b2446213.zip
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). llvm-svn: 90607
Diffstat (limited to 'clang/test/CodeGenCXX/inline-functions.cpp')
-rw-r--r--clang/test/CodeGenCXX/inline-functions.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/inline-functions.cpp b/clang/test/CodeGenCXX/inline-functions.cpp
new file mode 100644
index 00000000000..9af4c6e5bec
--- /dev/null
+++ b/clang/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() { }
OpenPOWER on IntegriCloud