summaryrefslogtreecommitdiffstats
path: root/lldb
diff options
context:
space:
mode:
authorSean Callanan <scallanan@apple.com>2014-03-11 19:34:04 +0000
committerSean Callanan <scallanan@apple.com>2014-03-11 19:34:04 +0000
commite3236a188260ec05e053354a461fa8d0125f29ad (patch)
treeba6a8c822dc8bda9758544ed9bfb93941c26c3fe /lldb
parent339f61549f461aec446b0e317b9a5070e7de1e5b (diff)
downloadbcm5719-llvm-e3236a188260ec05e053354a461fa8d0125f29ad.tar.gz
bcm5719-llvm-e3236a188260ec05e053354a461fa8d0125f29ad.zip
Fixed a problem where the expression parser was
erroneously completing Objective-C classes sourced from the Objective-C runtime without checking if there was an authoritative version in the debug information. <rdar://problem/16065049> llvm-svn: 203600
Diffstat (limited to 'lldb')
-rw-r--r--lldb/source/Expression/ClangASTSource.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/lldb/source/Expression/ClangASTSource.cpp b/lldb/source/Expression/ClangASTSource.cpp
index 853d102c542..4c25114202c 100644
--- a/lldb/source/Expression/ClangASTSource.cpp
+++ b/lldb/source/Expression/ClangASTSource.cpp
@@ -316,6 +316,22 @@ ClangASTSource::CompleteType (clang::ObjCInterfaceDecl *interface_decl)
dumper.ToLog(log, " [COID] ");
}
+ Decl *original_decl = NULL;
+ ASTContext *original_ctx = NULL;
+
+ if (m_ast_importer->ResolveDeclOrigin(interface_decl, &original_decl, &original_ctx))
+ {
+ if (ObjCInterfaceDecl *original_iface_decl = dyn_cast<ObjCInterfaceDecl>(original_decl))
+ {
+ ObjCInterfaceDecl *complete_iface_decl = GetCompleteObjCInterface(original_iface_decl);
+
+ if (complete_iface_decl && (complete_iface_decl != original_iface_decl))
+ {
+ m_ast_importer->SetDeclOrigin(interface_decl, original_iface_decl);
+ }
+ }
+ }
+
m_ast_importer->CompleteObjCInterfaceDecl (interface_decl);
if (interface_decl->getSuperClass() &&
OpenPOWER on IntegriCloud