[cfe-dev] Big Clang DLL, plug-in mechanism revision
    Cédric Venet 
    cedric.venet at laposte.net
       
    Sat May 14 02:19:21 PDT 2011
    
    
  
Le 11/05/2011 22:04, John Thompson a écrit :
> I'm afraid I'm a bit template-dumb and don't know how to do those 
> declarations.  Every syntax combination I tried either didn't compile 
> there, or elsewhere, the latter because the exported declarations 
> would conflict with the "static node *Head, *Tail;" and "static 
> listener *ListenerHead, *ListenerTail;" definitions inside the 
> Registry template class.  Can you give me an example?
> Template trickiness like this is why I felt a less sophisticated 
> plug-in registry mechanism would be better.  But if you can show me 
> how to do it per your suggestion, I'll give it a try.
>
Here are patches for clang and llvm which should solve the registration 
problem. I tested them on win7 VS2010 without dll and the test are ok 
[1]. Turn out there was only 3 registries, so very small code change. On 
linux, there may be some more, I didn't check. Also these patch are not 
commit quality (line length, CRLF, comment/placement of the code). 
However, they should solve your problem. Let me know if you still have 
undefined or duplicated symbol when using your dll.
Thank you for tackling the dll problem on windows and hopping this make 
it into trunk sometime soon.
Cédric
[1] I have 3 llvm test failling and 1 clang test but it was before I 
made any change
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: llvmregistry.patch
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20110514/8a5e0786/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: clangregistry.patch
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20110514/8a5e0786/attachment-0001.ksh>
    
    
More information about the cfe-dev
mailing list