[llvm-branch-commits] [cfe-branch] r115528 - /cfe/branches/Apple/whitney/lib/Serialization/ASTWriter.cpp
Daniel Dunbar
daniel at zuster.org
Mon Oct 4 11:34:49 PDT 2010
Author: ddunbar
Date: Mon Oct 4 13:34:49 2010
New Revision: 115528
URL: http://llvm.org/viewvc/llvm-project?rev=115528&view=rev
Log:
Merge r115527:
--
Author: Douglas Gregor <dgregor at apple.com>
Date: Mon Oct 4 18:21:45 2010 +0000
When a type comes from a previously-loaded PCH/AST file, don't try to write it into a chained PCH file.
Modified:
cfe/branches/Apple/whitney/lib/Serialization/ASTWriter.cpp
Modified: cfe/branches/Apple/whitney/lib/Serialization/ASTWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/whitney/lib/Serialization/ASTWriter.cpp?rev=115528&r1=115527&r2=115528&view=diff
==============================================================================
--- cfe/branches/Apple/whitney/lib/Serialization/ASTWriter.cpp (original)
+++ cfe/branches/Apple/whitney/lib/Serialization/ASTWriter.cpp Mon Oct 4 13:34:49 2010
@@ -1418,6 +1418,11 @@
if (Idx.getIndex() == 0) // we haven't seen this type before.
Idx = TypeIdx(NextTypeID++);
+ // If this type comes from a previously-loaded PCH/AST file, don't try to
+ // write the type again.
+ if (Idx.getIndex() < FirstTypeID)
+ return;
+
// Record the offset for this type.
unsigned Index = Idx.getIndex() - FirstTypeID;
if (TypeOffsets.size() == Index)
More information about the llvm-branch-commits
mailing list