<rdar://problem/11870357>

Allow "frame variable" to find ivars without the need for "this->" or "self->".  


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@160211 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Expression/ClangExpressionDeclMap.cpp b/source/Expression/ClangExpressionDeclMap.cpp
index ca0f2dd..e85239d 100644
--- a/source/Expression/ClangExpressionDeclMap.cpp
+++ b/source/Expression/ClangExpressionDeclMap.cpp
@@ -2443,12 +2443,13 @@
             if (!sym_ctx.function)
                 return;
             
-            clang::DeclContext *decl_context;
-            
-            if (sym_ctx.block && sym_ctx.block->GetInlinedFunctionInfo())
-                decl_context = sym_ctx.block->GetClangDeclContextForInlinedFunction();
-            else
-                decl_context = sym_ctx.function->GetClangDeclContext();
+            // Get the block that defines the function
+            Block *function_block = sym_ctx.GetFunctionBlock();
+
+            if (!function_block)
+                return;
+
+            clang::DeclContext *decl_context = function_block->GetClangDeclContext();
             
             if (!decl_context)
                 return;
@@ -2501,12 +2502,13 @@
             if (!sym_ctx.function)
                 return;
             
-            clang::DeclContext *decl_context;
+            // Get the block that defines the function
+            Block *function_block = sym_ctx.GetFunctionBlock();
             
-            if (sym_ctx.block && sym_ctx.block->GetInlinedFunctionInfo())
-                decl_context = sym_ctx.block->GetClangDeclContextForInlinedFunction();
-            else
-                decl_context = sym_ctx.function->GetClangDeclContext();
+            if (!function_block)
+                return;
+            
+            clang::DeclContext *decl_context = function_block->GetClangDeclContext();
             
             if (!decl_context)
                 return;