[LLVMdev] LLVM 3.6: problems building on Windows using MSVC 2013

Alan Garny agarny at hellix.com
Tue Mar 10 09:14:27 PDT 2015


> > So… my question is: why?! More importantly: what do I need to do to be
> > able to export/import a class such as clang::driver::Compilation?
> 
> It looks like MSVC is trying to synthesize and export the copy assignment
> operator and copy constructur. This is interesting, as I thought it wouldn't do
> that if the class turns out not to be non-copyable.
> 
> Does adding the following to the class (and similarly for others that are
> failing) work?
> 
>   Compilation& operator=(Compilation&) = delete;
>   Compilation(Compilation&) = delete

Good timing. This is the conclusion and solution to which I came too. I have tried it on my test case and it is working fine. I am now going to try it on my project and see how it goes, but at least that seems promising.

Alan





More information about the llvm-dev mailing list