When loading a module with no local entities, still bump the size of the
tables that correspond to ContinuousRangeMaps, since the keys to those maps need to be unique, or we may map to the wrong offset. This fixes a crash + malformed AST file seen when loading some modules that import Cocoa on Darwin, which is a module with no contents except imports of other modules. Unfortunately I have not been able to find a reduced test case that reproduces this problem. Also add an assert that we aren't mapping one key to multiple values in CRM. We ought to be able to say there are no duplicate keys at all, but there are a bunch of 0 -> 0 mappings that are showing up, probably coming from the source location table. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215810 91177308-0d34-0410-b5e6-96231b3b80d8
Showing
- include/clang/Serialization/ContinuousRangeMap.h 8 additions, 0 deletionsinclude/clang/Serialization/ContinuousRangeMap.h
- lib/Serialization/ASTReader.cpp 25 additions, 16 deletionslib/Serialization/ASTReader.cpp
- lib/Serialization/ASTWriter.cpp 3 additions, 0 deletionslib/Serialization/ASTWriter.cpp
Loading
Please register or sign in to comment