diff options
| author | Jim Ingham <jingham@apple.com> | 2012-10-27 02:54:13 +0000 |
|---|---|---|
| committer | Jim Ingham <jingham@apple.com> | 2012-10-27 02:54:13 +0000 |
| commit | 3793976376acc29c0b302c228c079d85c75cbffb (patch) | |
| tree | e10218cf5b7b3867aa94474d36dbd351f3c5a16b /lldb/source/Symbol/ClangASTImporter.cpp | |
| parent | 4dc613b364296d57d8d12cb2f1285d54b21064f1 (diff) | |
| download | bcm5719-llvm-3793976376acc29c0b302c228c079d85c75cbffb.tar.gz bcm5719-llvm-3793976376acc29c0b302c228c079d85c75cbffb.zip | |
This is the first phase of supporting the DW_AT_object_pointer tag. I expanded the decl metadata
so it could hold this information, and then used it to look up unfound names in the object pointer
if it exists. This gets "frame var" to work for unqualified references to ivars captured in blocks.
But the expression parser is ignoring this information still.
llvm-svn: 166860
Diffstat (limited to 'lldb/source/Symbol/ClangASTImporter.cpp')
| -rw-r--r-- | lldb/source/Symbol/ClangASTImporter.cpp | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/lldb/source/Symbol/ClangASTImporter.cpp b/lldb/source/Symbol/ClangASTImporter.cpp index b12128467de..bd669fccf21 100644 --- a/lldb/source/Symbol/ClangASTImporter.cpp +++ b/lldb/source/Symbol/ClangASTImporter.cpp @@ -60,15 +60,20 @@ ClangASTImporter::CopyDecl (clang::ASTContext *dst_ast, if (log) { + lldb::user_id_t user_id; + ClangASTMetadata *metadata = GetDeclMetadata(decl); + if (metadata) + user_id = metadata->GetUserID(); + if (NamedDecl *named_decl = dyn_cast<NamedDecl>(decl)) log->Printf(" [ClangASTImporter] WARNING: Failed to import a %s '%s', metadata 0x%llx", decl->getDeclKindName(), named_decl->getNameAsString().c_str(), - GetDeclMetadata(decl)); + user_id); else log->Printf(" [ClangASTImporter] WARNING: Failed to import a %s, metadata 0x%llx", decl->getDeclKindName(), - GetDeclMetadata(decl)); + user_id); } } @@ -243,7 +248,7 @@ ClangASTImporter::CompleteObjCInterfaceDecl (clang::ObjCInterfaceDecl *interface return true; } -uint64_t +ClangASTMetadata * ClangASTImporter::GetDeclMetadata (const clang::Decl *decl) { DeclOrigin decl_origin = GetDeclOrigin(decl); @@ -450,6 +455,11 @@ clang::Decl if (log) { + lldb::user_id_t user_id; + ClangASTMetadata *metadata = m_master.GetDeclMetadata(from); + if (metadata) + user_id = metadata->GetUserID(); + if (NamedDecl *from_named_decl = dyn_cast<clang::NamedDecl>(from)) { std::string name_string; @@ -462,7 +472,7 @@ clang::Decl to, name_string.c_str(), from, - m_master.GetDeclMetadata(from)); + user_id); } else { @@ -470,7 +480,7 @@ clang::Decl from->getDeclKindName(), to, from, - m_master.GetDeclMetadata(from)); + user_id); } } |

