[weak vtables] Remove a bunch of weak vtables
[oota-llvm.git] / unittests / ADT / IntrusiveRefCntPtrTest.cpp
index 0c8c4ca16dd736709b1ffe3ab7326b853a4378f1..a74e05e7b2467fab0133cd0b6dc4e7c7039aa268 100644 (file)
 namespace llvm {
 
 struct VirtualRefCounted : public RefCountedBaseVPTR {
-  virtual void f() {}
+  virtual void f();
 };
 
+// Provide out-of-line definition to prevent weak vtable.
+void VirtualRefCounted::f() {}
+
 // Run this test with valgrind to detect memory leaks.
 TEST(IntrusiveRefCntPtr, RefCountedBaseVPTRCopyDoesNotLeak) {
   VirtualRefCounted *V1 = new VirtualRefCounted;