llvm-project/clang/tools
Douglas Gregor 9b3932c0bc Fix a marvelous chained AST writing bug, where we end up with the
following amusing sequence:
  - AST writing schedules writing a type X* that it had never seen
  before
  - AST writing starts writing another declaration, ends up
  deserializing X* from a prior AST file. Now we have two type IDs for
  the same type!
  - AST writer tries to write X*. It only has the lower-numbered ID
  from the the prior AST file, so references to the higher-numbered ID
  that was scheduled for writing go off into lalaland.

To fix this, keep the higher-numbered ID so we end up writing the type
twice. Since this issue occurs so rarely, and type records are
generally rather small, I deemed this better than the alternative: to
keep a separate mapping from the higher-numbered IDs to the
lower-numbered IDs, which we would end up having to check whenever we
want to deserialize any type.

Fixes <rdar://problem/8511624>, I think.

llvm-svn: 115647
2010-10-05 18:37:06 +00:00
..
c-index-test Introduce a new libclang function, clang_getCursorDisplayName(), which 2010-10-02 22:49:11 +00:00
driver build: Add support for a CLANG_ORDER_FILE build variable to specify the path to 2010-09-16 00:42:38 +00:00
libclang Fix a marvelous chained AST writing bug, where we end up with the 2010-10-05 18:37:06 +00:00
scan-build Updated scan-build: 2010-09-30 01:12:05 +00:00
scan-view Increase scan-view max timeout to 1 minute. 2009-05-04 19:02:41 +00:00
CMakeLists.txt Rename 'CIndex' to 'libclang', since it has basically become our stable public 2010-04-30 21:51:10 +00:00
Makefile Minix doesn't support dylibs, PR7294 2010-06-29 05:05:09 +00:00