r192494 - Adds Microsoft compatiable C++ record layout code to clang.

Will Wilson will at indefiant.com
Thu Feb 20 06:16:26 PST 2014


Hi Warren,

As far as I understand, a PCH is treated much like a simplified clang
module and as such any PCH is an ExternalSource meaning the ExternalSource
is valid in this case. I don't thing DWARF has any relevance here AFAIK.

It's likely that I was seeing this "delayed" layout behaviour due to the
record in question being a class template declared in the PCH that wasn't
instantiated in the PCH but later in a compiland including the PCH. After
all you can't do record layout for a template class that hasn't yet been
instantiated (well unless all the data members weren't dependent on
template arguments). So even if known record layout are serialized in the
PCH (I don't actually know if they are or not TBH) there will always be
class templates instantiations that would have to be laid out after the
creation of the PCH - as is the case for me.

Either way, in this case the "&& !D->getASTContext().getExternalSource()"
still does a layout, it just does one without using MS layout rules.

- Will.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140220/0c75473d/attachment.html>


More information about the cfe-commits mailing list