[LLVMbugs] [Bug 6920] New: clang++: doesn't emit inline operator delete from parent class
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Sat Apr 24 08:53:37 PDT 2010
http://llvm.org/bugs/show_bug.cgi?id=6920
Summary: clang++: doesn't emit inline operator delete from
parent class
Product: clang
Version: unspecified
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: edwintorok at gmail.com
CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com
Yet another blender link failure:
../../lib/libbf_converter.a(BL_BlenderDataConversion.o): In function
`btAxisSweep3Internal<unsigned int>::~btAxisSweep3Internal()':
/home/edwin/clangtests/blender-2.49b/source/gameengine/Converter/BL_BlenderDataConversion.cpp:(.gnu.linkonce.t._ZN20btAxisSweep3InternalIjED0Ev+0x27):
undefined reference to `btAxisSweep3Internal<unsigned int>::operator
delete(void*)'
../../lib/libextern_bullet.a(btAxisSweep3.o): In function
`bt32BitAxisSweep3::~bt32BitAxisSweep3()':
/home/edwin/clangtests/blender-2.49b/extern/bullet2/src/BulletCollision/BroadphaseCollision/btAxisSweep3.cpp:(.gnu.linkonce.t._ZN17bt32BitAxisSweep3D0Ev+0x27):
undefined reference to `btAxisSweep3Internal<unsigned int>::operator
delete(void*)'
collect2: ld returned 1 exit status
Here is a testcase:
class btVector3
{
};
class btOverlappingPairCache;
class btBroadphaseInterface
{
};
template < typename BP_FP_INT_TYPE > class btAxisSweep3Internal:public
btBroadphaseInterface
{
protected:BP_FP_INT_TYPE m_bpHandleMask;
inline void operator delete (void *ptr)
{
}
public:btAxisSweep3Internal (const btVector3 & worldAabbMin,
const btVector3 & worldAabbMax,
BP_FP_INT_TYPE handleMask,
BP_FP_INT_TYPE handleSentinel,
BP_FP_INT_TYPE maxHandles =
16384, btOverlappingPairCache * pairCache =
0, bool disableRaycastAccelerator = false);
virtual ~ btAxisSweep3Internal ();
};
class bt32BitAxisSweep3:public btAxisSweep3Internal < unsigned int >
{
public:bt32BitAxisSweep3 (const btVector3 & worldAabbMin,
const btVector3 & worldAabbMax, unsigned int maxHandles =
1500000, btOverlappingPairCache * pairCache =
0, bool disableRaycastAccelerator = false);
};
bt32BitAxisSweep3::bt32BitAxisSweep3 (const btVector3 & worldAabbMin,
const btVector3 & worldAabbMax,
unsigned int maxHandles,
btOverlappingPairCache * pairCache,
bool disableRaycastAccelerator):
btAxisSweep3Internal < unsigned int >(worldAabbMin, worldAabbMax,
0xfffffffe, 0x7fffffff, maxHandles,
pairCache,
disableRaycastAccelerator)
{
}
And here is the test script (_ZN20btAxisSweep3InternalIjEdlEP is the missing
symbol):
#!/bin/bash
/home/edwin/llvm-git/obj/Release/bin/clang++ x2.i -c -o x.o 2>/dev/null || exit
1
nm x.o | grep _ZN20btAxisSweep3InternalIjEdlEPv |grep " U " || exit 1
g++ x2.i -c -o x.o 2>/dev/null || exit 1
nm x.o | grep _ZN20btAxisSweep3InternalIjEdlEPv |grep " U " && exit 1
exit 0
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list