[cfe-commits] r135705 - in /cfe/trunk: include/clang/Serialization/ASTReader.h lib/Serialization/ASTReader.cpp
Douglas Gregor
dgregor at apple.com
Thu Jul 21 16:44:55 PDT 2011
On Jul 21, 2011, at 4:28 PM, Jonathan Turner wrote:
>
> On Jul 21, 2011, at 2:23 PM, Douglas Gregor wrote:
>
>> This isn't the right place to update TotalModulesSizeInBits; it would break if some AST file in the chain didn't have any CXXBaseSpecifiers!
>
> Agreed.
>
> I played with moving it, but I wasn't sure where to put it. Unit tests like PCH/chain-cxx.cpp deserialize the CXX_BASE_SPECIFIER_OFFSETS in a different order PerFileData-wise than, say, the PerFileData elements' sizes are set in ReadASTCore. As long as we update TotalModulesSizeInBits (and the PerFileData's GlobalBitOffset) in lock-step with CXX_BASE_SPECIFIER_OFFSETS, we're fine, but doing it in a different order causes issues.
TotalModulesSizeInBits and GlobalBitOffset have nothing to do with CXX_BASE_SPECIFIER_OFFSETS, and they shouldn't depend on its presence or absence. Put them in the right places in ReadASTCore.
- Doug
More information about the cfe-commits
mailing list