Updated the revision of LLVM/Clang used by LLDB.
This takes two important changes:

- Calling blocks is now supported.  You need to
  cast their return values, but that works fine.

- We now can correctly run JIT-compiled
  expressions that use floating-point numbers.

Also, we have taken a fix that allows us to
ignore access control in Objective-C as in C++.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@152286 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Expression/ClangExpressionDeclMap.cpp b/source/Expression/ClangExpressionDeclMap.cpp
index 12b35f9..1f46ff0 100644
--- a/source/Expression/ClangExpressionDeclMap.cpp
+++ b/source/Expression/ClangExpressionDeclMap.cpp
@@ -2807,9 +2807,7 @@
         return NULL;
     }
 
-#ifdef EXPRESSION_PARSER_SUPPORTS_BLOCKS
     var_opaque_type = MaybePromoteToBlockPointerType (ast, var_opaque_type);
-#endif
     
     DWARFExpression &var_location_expr = var->LocationExpression();
     
diff --git a/source/Expression/ClangExpressionParser.cpp b/source/Expression/ClangExpressionParser.cpp
index 3119146..0df6a67 100644
--- a/source/Expression/ClangExpressionParser.cpp
+++ b/source/Expression/ClangExpressionParser.cpp
@@ -224,6 +224,10 @@
         break;
     }
     
+    m_compiler->getLangOpts().DebuggerSupport = true; // Features specifically for debugger clients
+    if (expr.DesiredResultType() == ClangExpression::eResultTypeId)
+        m_compiler->getLangOpts().DebuggerCastResultToId = true;
+    
     lldb::ProcessSP process_sp;
     if (exe_scope)
         process_sp = exe_scope->CalculateProcess();
@@ -237,6 +241,11 @@
                 m_compiler->getLangOpts().ObjCNonFragileABI = true;     // NOT i386
                 m_compiler->getLangOpts().ObjCNonFragileABI2 = true;    // NOT i386
             }
+            
+            if (process_sp->GetObjCLanguageRuntime()->HasNewLiteralsAndIndexing())
+            {
+                m_compiler->getLangOpts().DebuggerObjCLiteral = true;
+            }
         }
     }
 
@@ -244,10 +253,6 @@
     m_compiler->getLangOpts().AccessControl = false; // Debuggers get universal access
     m_compiler->getLangOpts().DollarIdents = true; // $ indicates a persistent variable name
     
-    m_compiler->getLangOpts().DebuggerSupport = true; // Features specifically for debugger clients
-    if (expr.DesiredResultType() == ClangExpression::eResultTypeId)
-        m_compiler->getLangOpts().DebuggerCastResultToId = true;
-    
     // Set CodeGen options
     m_compiler->getCodeGenOpts().EmitDeclMetadata = true;
     m_compiler->getCodeGenOpts().InstrumentFunctions = false;
diff --git a/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp b/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp
index 90fd352..84042b4 100644
--- a/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp
+++ b/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp
@@ -352,3 +352,21 @@
     
     return false;
 }
+
+bool
+AppleObjCRuntime::CalculateHasNewLiteralsAndIndexing()
+{
+    if (!m_process)
+        return false;
+    
+    Target &target(m_process->GetTarget());
+    
+    static ConstString s_method_signature("-[NSDictionary objectForKeyedSubscript:]");
+    
+    SymbolContextList sc_list;
+    
+    if (target.GetImages().FindSymbolsWithNameAndType(s_method_signature, eSymbolTypeCode, sc_list))
+        return true;
+    else
+        return false;
+}
diff --git a/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.h b/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.h
index bda16e2..3db7477 100644
--- a/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.h
+++ b/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.h
@@ -94,6 +94,9 @@
     // you can't make an instance of this generic runtime.
     
 protected:
+    virtual bool
+    CalculateHasNewLiteralsAndIndexing();
+    
     static bool
     AppleIsModuleObjCLibrary (const lldb::ModuleSP &module_sp);
 
diff --git a/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp b/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
index e5e0473..ac03b17 100644
--- a/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
+++ b/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
@@ -2217,6 +2217,17 @@
                 }
             }
             break;
+        case LoadCommandMain:
+            {
+                ConstString text_segment_name ("__TEXT");
+                uint64_t entryoffset = m_data.GetU64(&offset);
+                SectionSP text_segment_sp = GetSectionList()->FindSectionByName(text_segment_name);
+                if (text_segment_sp)
+                {
+                    done = true;
+                    start_address = text_segment_sp->GetFileAddress() + entryoffset;
+                }
+            }
 
         default:
             break;
diff --git a/source/Target/ObjCLanguageRuntime.cpp b/source/Target/ObjCLanguageRuntime.cpp
index 0076ff0..6d6caef 100644
--- a/source/Target/ObjCLanguageRuntime.cpp
+++ b/source/Target/ObjCLanguageRuntime.cpp
@@ -27,7 +27,8 @@
 }
 
 ObjCLanguageRuntime::ObjCLanguageRuntime (Process *process) :
-    LanguageRuntime (process)
+    LanguageRuntime (process),
+    m_has_new_literals_and_indexing (eLazyBoolCalculate)
 {
 
 }
diff --git a/source/Target/StackFrame.cpp b/source/Target/StackFrame.cpp
index 1d6cb93..4b462ee 100644
--- a/source/Target/StackFrame.cpp
+++ b/source/Target/StackFrame.cpp
@@ -724,13 +724,23 @@
                                 
                                 if (valobj_sp->IsPointerType ())
                                 {
-                                    if (no_synth_child == false
-                                        && 
-                                        ClangASTType::GetMinimumLanguage(valobj_sp->GetClangAST(),
-                                                                         valobj_sp->GetClangType()) == eLanguageTypeObjC /* is ObjC pointer */
-                                        &&
-                                        ClangASTContext::IsPointerType(ClangASTType::GetPointeeType(valobj_sp->GetClangType())) == false /* is not double-ptr */)
+                                    bool is_objc_pointer = true;
+                                    
+                                    if (ClangASTType::GetMinimumLanguage(valobj_sp->GetClangAST(), valobj_sp->GetClangType()) != eLanguageTypeObjC)
+                                        is_objc_pointer = false;
+                                    else if (!ClangASTContext::IsPointerType(valobj_sp->GetClangType()))
+                                        is_objc_pointer = false;
+
+                                    if (no_synth_child && is_objc_pointer)
                                     {
+                                        error.SetErrorStringWithFormat("\"(%s) %s\" is an Objective-C pointer, and cannot be subscripted",
+                                                                       valobj_sp->GetTypeName().AsCString("<invalid type>"),
+                                                                       var_expr_path_strm.GetString().c_str());
+                                        
+                                        return ValueObjectSP();
+                                    }
+                                    else if (is_objc_pointer)
+                                    {                                            
                                         // dereferencing ObjC variables is not valid.. so let's try and recur to synthetic children
                                         ValueObjectSP synthetic = valobj_sp->GetSyntheticValue(eUseSyntheticFilter);
                                         if (synthetic.get() == NULL /* no synthetic */