llvm-project/clang/tools/libclang
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
..
CIndex.cpp Introduce a new libclang function, clang_getCursorDisplayName(), which 2010-10-02 22:49:11 +00:00
CIndexCXX.cpp Introduce a new libclang function, 2010-09-02 00:07:54 +00:00
CIndexCodeCompletion.cpp Add some missing concurrency checks into libclang 2010-09-23 18:47:53 +00:00
CIndexDiagnostic.cpp Simplify FixItHint by eliminated the unnecessary InsertionLoc 2010-08-18 14:24:02 +00:00
CIndexDiagnostic.h Rename 'CIndex' to 'libclang', since it has basically become our stable public 2010-04-30 21:51:10 +00:00
CIndexInclusionStack.cpp Rename 'CIndex' to 'libclang', since it has basically become our stable public 2010-04-30 21:51:10 +00:00
CIndexUSRs.cpp Fix a marvelous chained AST writing bug, where we end up with the 2010-10-05 18:37:06 +00:00
CIndexer.cpp When handling raw_ostream errors manually, use clear_error() so that 2010-05-27 20:16:37 +00:00
CIndexer.h Rename 'CIndex' to 'libclang', since it has basically become our stable public 2010-04-30 21:51:10 +00:00
CMakeLists.txt Revert "CMake: Update to use standard CMake dependency tracking facilities instead" 2010-09-13 23:54:41 +00:00
CXCursor.cpp Introduce a new kind of cursor into libclang, which covers a reference 2010-09-13 22:52:57 +00:00
CXCursor.h Introduce a new kind of cursor into libclang, which covers a reference 2010-09-13 22:52:57 +00:00
CXSourceLocation.h Per Doug's suggestion, move check for invalid SourceLocation into 2010-06-28 23:54:17 +00:00
CXType.cpp Teach clang_getCursorType() about base specifiers and other references 2010-10-02 21:57:58 +00:00
CXType.h Add libclang API hook "clang_getIBOutletCollectionType" to query the collection type for iboutletcollection attributes. 2010-08-26 01:42:22 +00:00
Makefile Another step in the process of making the parser depend on Sema: 2010-08-20 18:27:03 +00:00
libclang.darwin.exports Introduce a new libclang function, clang_getCursorDisplayName(), which 2010-10-02 22:49:11 +00:00
libclang.exports Introduce a new libclang function, clang_getCursorDisplayName(), which 2010-10-02 22:49:11 +00:00