Simplify and "robust-ify" the way that CXXRecord references point to the definition data when loaded from PCH.

Temporary disable 'test/PCH/chain-cxx.cpp' until a better way to fix it is in place.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117234 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Serialization/ASTReader.cpp b/lib/Serialization/ASTReader.cpp
index 9dd6f4a..162fa26 100644
--- a/lib/Serialization/ASTReader.cpp
+++ b/lib/Serialization/ASTReader.cpp
@@ -4318,6 +4318,9 @@
     // decls to the consumer.
     if (Consumer)
       PassInterestingDeclsToConsumer();
+
+    assert(PendingForwardRefs.size() == 0 &&
+           "Some forward refs did not get linked to the definition!");
   }
   --NumCurrentElementsDeserializing;
 }