[ASTImporter] Set MustBuildLookupTable on PrimaryContext
authorGabor Marton <martongabesz@gmail.com>
Mon, 26 Nov 2018 17:09:50 +0000 (17:09 +0000)
committerGabor Marton <martongabesz@gmail.com>
Mon, 26 Nov 2018 17:09:50 +0000 (17:09 +0000)
Summary: SetMustBuildLookupTable() must always be called on a primary context.

Reviewers: labath, shafik, a.sidorin

Subscribers: rnkovacs, dkrupp, Szelethus, gamesh411

Differential Revision: https://reviews.llvm.org/D54863

llvm-svn: 347575

lldb/source/Symbol/ClangASTImporter.cpp

index ea3b141..b685078 100644 (file)
@@ -1050,7 +1050,7 @@ clang::Decl *ClangASTImporter::Minion::Imported(clang::Decl *from,
     TagDecl *to_tag_decl = dyn_cast<TagDecl>(to);
 
     to_tag_decl->setHasExternalLexicalStorage();
-    to_tag_decl->setMustBuildLookupTable();
+    to_tag_decl->getPrimaryContext()->setMustBuildLookupTable();
 
     if (log)
       log->Printf(