[lldb-dev] Help with MSVC build issues

Zachary Turner via lldb-dev lldb-dev at lists.llvm.org
Thu Oct 22 11:23:49 PDT 2015

The classes appear to be all forward declared intentionally, so you'd need
to include a lot of missing files.  Just moving the destructor to cpp file
should be pretty easy and still allow to keep the header footprint down,
which speeds up build times.

On Thu, Oct 22, 2015 at 11:22 AM Eugene Zelenko <eugene.zelenko at gmail.com>

> On Thu, Oct 22, 2015 at 11:15 AM, Zachary Turner <zturner at google.com>
> wrote:
> > For the disassembler patch, the problem is you've defaulted the
> destructor
> > but you've got a unique_ptr to a forward declared class.  MSVC is
> actually
> > correct in failing to compile this, and I'm not sure why other compilers
> are
> > accepting it.  My guess is something to do with the order of includes
> from
> > the cpp file.
> >
> > To fix this you need to remove the `default` keyword from the destructor
> and
> > provide an empty implementation of the destructor in
> DisassemblerLLVMC.cpp
> >
> > This problem occurs in other places too.  In OperatingSystemGo.h the same
> > problem exists with DynamicRegisterInfo.  That's the one causing the
> > operating system patch to fail.
> >
> > What compiler are you testing this with?  This should fail under clang as
> > well, I'm surprised it doesn't.  Are you using GCC by chance?
> >
> > In any case, you'll need to fix all the occurrences of having a defaulted
> > destructor in a class with a std::unique_ptr of an incomplete type.
> I think including missing file will be better solution.
> I use trunk (~ week old) Clang.
> Eugene.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20151022/892accde/attachment.html>

More information about the lldb-dev mailing list