summaryrefslogtreecommitdiffstats
path: root/lldb/scripts/clang.complete-type-being-converted.diff
blob: 8c01fa1161afcb38550c53118cee8e29e64cd2cf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Index: lib/CodeGen/CodeGenTypes.cpp
===================================================================
--- lib/CodeGen/CodeGenTypes.cpp	(revision 146622)
+++ lib/CodeGen/CodeGenTypes.cpp	(working copy)
@@ -113,6 +113,9 @@
 static bool 
 isSafeToConvert(const RecordDecl *RD, CodeGenTypes &CGT,
                 llvm::SmallPtrSet<const RecordDecl*, 16> &AlreadyChecked) {
+  if (RD->hasExternalLexicalStorage() && !RD->getDefinition())
+    RD->getASTContext().getExternalSource()->CompleteType(const_cast<RecordDecl*>(RD));
+
   // If we have already checked this type (maybe the same type is used by-value
   // multiple times in multiple structure fields, don't check again.
   if (!AlreadyChecked.insert(RD)) return true;
OpenPOWER on IntegriCloud