[Lldb-commits] [PATCH] Fix expression evaluation after clang r232793

Pavel Labath labath at google.com
Fri Mar 20 07:39:02 PDT 2015


Hi rsmith, clayborg,

I do not entirely understand what is going on here, but it seems lldb has used
setHasExternalLexicalStorage on a TagDecl to trigger some kind of lazy loading of class contents.
However, r232793 in clang removed this possibility, which broke expression evaluation in lldb.
This CL fixes this by calling CompleteTagDecl manually.

I do not know if this is the correct fix for this issue, so I am mostly just drawing attention to
it. Feel free to commit a more correct solution.

http://reviews.llvm.org/D8482

Files:
  source/Symbol/ClangASTImporter.cpp

Index: source/Symbol/ClangASTImporter.cpp
===================================================================
--- source/Symbol/ClangASTImporter.cpp
+++ source/Symbol/ClangASTImporter.cpp
@@ -682,6 +682,7 @@
 
         to_tag_decl->setHasExternalLexicalStorage();
         to_tag_decl->setMustBuildLookupTable();
+        m_master.CompleteTagDecl(to_tag_decl);
 
         if (log)
             log->Printf("    [ClangASTImporter] To is a TagDecl - attributes %s%s [%s->%s]",
@@ -706,6 +707,7 @@
 
         to_interface_decl->setHasExternalLexicalStorage();
         to_interface_decl->setHasExternalVisibleStorage();
+        m_master.CompleteObjCInterfaceDecl(to_interface_decl);
 
         /*to_interface_decl->setExternallyCompleted();*/

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D8482.22345.patch
Type: text/x-patch
Size: 743 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20150320/56d88463/attachment.bin>


More information about the lldb-commits mailing list