From 2d061e20f6eb63c470fb0b5a1f1ae8f8fc6067a9 Mon Sep 17 00:00:00 2001 From: Enrico Granata Date: Thu, 25 Jun 2015 19:17:04 +0000 Subject: Fix a bug where we were trying to reconstruct ivars of ObjC types from the runtime in "expression parser mode" The expression parser mode allows UnknownAnyTy to make it all the way through, but that is bad for ivars because it means type layout fails horribly (as in, clang crashes) This patch fixes the issue by using the "variables view mode", which masks UnknownAnyTy as empty-type, and pointer-to UnknownAnyTy as void* This, in turn, allows LLDB to properly reconstruct ivars of IMP type in ObjC type - as per accompanying test case Fixes rdar://21471326 llvm-svn: 240677 --- .../LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCDeclVendor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lldb/source/Plugins') diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCDeclVendor.cpp b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCDeclVendor.cpp index 76ac690e717..2c4ecf4987c 100644 --- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCDeclVendor.cpp +++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCDeclVendor.cpp @@ -496,7 +496,7 @@ AppleObjCDeclVendor::FinishDecl(clang::ObjCInterfaceDecl *interface_decl) if (!name || !type) return false; - const bool for_expression = true; + const bool for_expression = false; if (log) log->Printf("[ AOTV::FD] Instance variable [%s] [%s], offset at %" PRIx64, name, type, offset_ptr); -- cgit v1.2.3