svn commit: r319533 - in vendor/lldb/dist: cmake/modules include/lldb/Host include/lldb/Host/linux packages/Python/lldbsuite/test/lang/objc/objc-new-syntax source/Host/linux source/Plugins/Platform...

Dimitry Andric dim at FreeBSD.org
Sat Jun 3 15:21:30 UTC 2017


Author: dim
Date: Sat Jun  3 15:21:27 2017
New Revision: 319533
URL: https://svnweb.freebsd.org/changeset/base/319533

Log:
  Vendor import of lldb trunk r304659:
  https://llvm.org/svn/llvm-project/lldb/trunk@304659

Modified:
  vendor/lldb/dist/cmake/modules/LLDBConfig.cmake
  vendor/lldb/dist/cmake/modules/LLDBGenerateConfig.cmake
  vendor/lldb/dist/include/lldb/Host/Config.h.cmake
  vendor/lldb/dist/include/lldb/Host/linux/Uio.h
  vendor/lldb/dist/packages/Python/lldbsuite/test/lang/objc/objc-new-syntax/TestObjCNewSyntax.py
  vendor/lldb/dist/source/Host/linux/LibcGlue.cpp
  vendor/lldb/dist/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
  vendor/lldb/dist/source/Plugins/Platform/MacOSX/PlatformDarwin.h
  vendor/lldb/dist/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp
  vendor/lldb/dist/source/Plugins/Platform/MacOSX/PlatformRemoteDarwinDevice.cpp
  vendor/lldb/dist/source/Symbol/ClangASTContext.cpp
  vendor/lldb/dist/unittests/CMakeLists.txt

Modified: vendor/lldb/dist/cmake/modules/LLDBConfig.cmake
==============================================================================
--- vendor/lldb/dist/cmake/modules/LLDBConfig.cmake	Sat Jun  3 15:21:24 2017	(r319532)
+++ vendor/lldb/dist/cmake/modules/LLDBConfig.cmake	Sat Jun  3 15:21:27 2017	(r319533)
@@ -334,28 +334,6 @@ if (HAVE_LIBDL)
   list(APPEND system_libs ${CMAKE_DL_LIBS})
 endif()
 
-# Check for syscall used by lldb-server on linux.
-# If these are not found, it will fall back to ptrace (slow) for memory reads.
-check_cxx_source_compiles("
-  #include <sys/uio.h>
-  int main() { process_vm_readv(0, nullptr, 0, nullptr, 0, 0); return 0; }"
-  HAVE_PROCESS_VM_READV)
-
-if (HAVE_PROCESS_VM_READV)
-  add_definitions(-DHAVE_PROCESS_VM_READV)
-else()
-  # If we don't have the syscall wrapper function, but we know the syscall number, we can
-  # still issue the syscall manually
-  check_cxx_source_compiles("
-      #include <sys/syscall.h>
-      int main() { return __NR_process_vm_readv; }"
-      HAVE_NR_PROCESS_VM_READV)
-
-  if (HAVE_NR_PROCESS_VM_READV)
-      add_definitions(-DHAVE_NR_PROCESS_VM_READV)
-  endif()
-endif()
-
 # Figure out if lldb could use lldb-server.  If so, then we'll
 # ensure we build lldb-server when an lldb target is being built.
 if (CMAKE_SYSTEM_NAME MATCHES "Android|Darwin|FreeBSD|Linux|NetBSD")

Modified: vendor/lldb/dist/cmake/modules/LLDBGenerateConfig.cmake
==============================================================================
--- vendor/lldb/dist/cmake/modules/LLDBGenerateConfig.cmake	Sat Jun  3 15:21:24 2017	(r319532)
+++ vendor/lldb/dist/cmake/modules/LLDBGenerateConfig.cmake	Sat Jun  3 15:21:27 2017	(r319533)
@@ -12,6 +12,15 @@ check_symbol_exists(sigaction signal.h HAVE_SIGACTION)
 check_include_file(termios.h HAVE_TERMIOS_H)
 check_include_files("sys/types.h;sys/event.h" HAVE_SYS_EVENT_H)
 
+check_cxx_source_compiles("
+  #include <sys/uio.h>
+  int main() { process_vm_readv(0, nullptr, 0, nullptr, 0, 0); return 0; }"
+  HAVE_PROCESS_VM_READV)
+check_cxx_source_compiles("
+    #include <sys/syscall.h>
+    int main() { return __NR_process_vm_readv; }"
+    HAVE_NR_PROCESS_VM_READV)
+
 # These checks exist in LLVM's configuration, so I want to match the LLVM names
 # so that the check isn't duplicated, but we translate them into the LLDB names
 # so that I don't have to change all the uses at the moment.

Modified: vendor/lldb/dist/include/lldb/Host/Config.h.cmake
==============================================================================
--- vendor/lldb/dist/include/lldb/Host/Config.h.cmake	Sat Jun  3 15:21:24 2017	(r319532)
+++ vendor/lldb/dist/include/lldb/Host/Config.h.cmake	Sat Jun  3 15:21:27 2017	(r319533)
@@ -20,4 +20,8 @@
 
 #cmakedefine01 HAVE_SIGACTION
 
+#cmakedefine01 HAVE_PROCESS_VM_READV
+
+#cmakedefine01 HAVE_NR_PROCESS_VM_READV
+
 #endif // #ifndef LLDB_HOST_CONFIG_H

Modified: vendor/lldb/dist/include/lldb/Host/linux/Uio.h
==============================================================================
--- vendor/lldb/dist/include/lldb/Host/linux/Uio.h	Sat Jun  3 15:21:24 2017	(r319532)
+++ vendor/lldb/dist/include/lldb/Host/linux/Uio.h	Sat Jun  3 15:21:27 2017	(r319533)
@@ -10,11 +10,12 @@
 #ifndef liblldb_Host_linux_Uio_h_
 #define liblldb_Host_linux_Uio_h_
 
+#include "lldb/Host/Config.h"
 #include <sys/uio.h>
 
 // We shall provide our own implementation of process_vm_readv if it is not
 // present
-#ifndef HAVE_PROCESS_VM_READV
+#if !HAVE_PROCESS_VM_READV
 ssize_t process_vm_readv(::pid_t pid, const struct iovec *local_iov,
                          unsigned long liovcnt, const struct iovec *remote_iov,
                          unsigned long riovcnt, unsigned long flags);

Modified: vendor/lldb/dist/packages/Python/lldbsuite/test/lang/objc/objc-new-syntax/TestObjCNewSyntax.py
==============================================================================
--- vendor/lldb/dist/packages/Python/lldbsuite/test/lang/objc/objc-new-syntax/TestObjCNewSyntax.py	Sat Jun  3 15:21:24 2017	(r319532)
+++ vendor/lldb/dist/packages/Python/lldbsuite/test/lang/objc/objc-new-syntax/TestObjCNewSyntax.py	Sat Jun  3 15:21:27 2017	(r319533)
@@ -26,16 +26,7 @@ class ObjCNewSyntaxTestCase(TestBase):
         # Find the line number to break inside main().
         self.line = line_number('main.m', '// Set breakpoint 0 here.')
 
-    @skipUnlessDarwin
-    @expectedFailureAll(
-        oslist=['macosx'],
-        compiler='clang',
-        compiler_version=[
-            '<',
-            '7.0.0'])
-    @skipIf(macos_version=["<", "10.12"])
-    @expectedFailureAll(archs=["i[3-6]86"])
-    def test_expr(self):
+    def runToBreakpoint(self):
         self.build()
         exe = os.path.join(os.getcwd(), "a.out")
         self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
@@ -55,6 +46,18 @@ class ObjCNewSyntaxTestCase(TestBase):
         self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
                     substrs=[' resolved, hit count = 1'])
 
+    @skipUnlessDarwin
+    @expectedFailureAll(
+        oslist=['macosx'],
+        compiler='clang',
+        compiler_version=[
+            '<',
+            '7.0.0'])
+    @skipIf(macos_version=["<", "10.12"])
+    @expectedFailureAll(archs=["i[3-6]86"])
+    def test_read_array(self):
+        self.runToBreakpoint()
+
         self.expect(
             "expr --object-description -- immutable_array[0]",
             VARIABLES_DISPLAYED_CORRECTLY,
@@ -65,6 +68,18 @@ class ObjCNewSyntaxTestCase(TestBase):
             VARIABLES_DISPLAYED_CORRECTLY,
             substrs=["foo"])
 
+    @skipUnlessDarwin
+    @expectedFailureAll(
+        oslist=['macosx'],
+        compiler='clang',
+        compiler_version=[
+            '<',
+            '7.0.0'])
+    @skipIf(macos_version=["<", "10.12"])
+    @expectedFailureAll(archs=["i[3-6]86"])
+    def test_update_array(self):
+        self.runToBreakpoint()
+
         self.expect(
             "expr --object-description -- mutable_array[0] = @\"bar\"",
             VARIABLES_DISPLAYED_CORRECTLY,
@@ -75,6 +90,18 @@ class ObjCNewSyntaxTestCase(TestBase):
             VARIABLES_DISPLAYED_CORRECTLY,
             substrs=["bar"])
 
+    @skipUnlessDarwin
+    @expectedFailureAll(
+        oslist=['macosx'],
+        compiler='clang',
+        compiler_version=[
+            '<',
+            '7.0.0'])
+    @skipIf(macos_version=["<", "10.12"])
+    @expectedFailureAll(archs=["i[3-6]86"])
+    def test_read_dictionary(self):
+        self.runToBreakpoint()
+
         self.expect(
             "expr --object-description -- immutable_dictionary[@\"key\"]",
             VARIABLES_DISPLAYED_CORRECTLY,
@@ -85,6 +112,18 @@ class ObjCNewSyntaxTestCase(TestBase):
             VARIABLES_DISPLAYED_CORRECTLY,
             substrs=["value"])
 
+    @skipUnlessDarwin
+    @expectedFailureAll(
+        oslist=['macosx'],
+        compiler='clang',
+        compiler_version=[
+            '<',
+            '7.0.0'])
+    @skipIf(macos_version=["<", "10.12"])
+    @expectedFailureAll(archs=["i[3-6]86"])
+    def test_update_dictionary(self):
+        self.runToBreakpoint()
+
         self.expect(
             "expr --object-description -- mutable_dictionary[@\"key\"] = @\"object\"",
             VARIABLES_DISPLAYED_CORRECTLY,
@@ -95,6 +134,18 @@ class ObjCNewSyntaxTestCase(TestBase):
             VARIABLES_DISPLAYED_CORRECTLY,
             substrs=["object"])
 
+    @skipUnlessDarwin
+    @expectedFailureAll(
+        oslist=['macosx'],
+        compiler='clang',
+        compiler_version=[
+            '<',
+            '7.0.0'])
+    @skipIf(macos_version=["<", "10.12"])
+    @expectedFailureAll(archs=["i[3-6]86"])
+    def test_array_literal(self):
+        self.runToBreakpoint()
+
         self.expect(
             "expr --object-description -- @[ @\"foo\", @\"bar\" ]",
             VARIABLES_DISPLAYED_CORRECTLY,
@@ -103,6 +154,18 @@ class ObjCNewSyntaxTestCase(TestBase):
                 "foo",
                 "bar"])
 
+    @skipUnlessDarwin
+    @expectedFailureAll(
+        oslist=['macosx'],
+        compiler='clang',
+        compiler_version=[
+            '<',
+            '7.0.0'])
+    @skipIf(macos_version=["<", "10.12"])
+    @expectedFailureAll(archs=["i[3-6]86"])
+    def test_dictionary_literal(self):
+        self.runToBreakpoint()
+
         self.expect(
             "expr --object-description -- @{ @\"key\" : @\"object\" }",
             VARIABLES_DISPLAYED_CORRECTLY,
@@ -110,9 +173,33 @@ class ObjCNewSyntaxTestCase(TestBase):
                 "key",
                 "object"])
 
+    @skipUnlessDarwin
+    @expectedFailureAll(
+        oslist=['macosx'],
+        compiler='clang',
+        compiler_version=[
+            '<',
+            '7.0.0'])
+    @skipIf(macos_version=["<", "10.12"])
+    @expectedFailureAll(archs=["i[3-6]86"])
+    def test_char_literal(self):
+        self.runToBreakpoint()
+
         self.expect("expr --object-description -- @'a'",
                     VARIABLES_DISPLAYED_CORRECTLY, substrs=[str(ord('a'))])
 
+    @skipUnlessDarwin
+    @expectedFailureAll(
+        oslist=['macosx'],
+        compiler='clang',
+        compiler_version=[
+            '<',
+            '7.0.0'])
+    @skipIf(macos_version=["<", "10.12"])
+    @expectedFailureAll(archs=["i[3-6]86"])
+    def test_integer_literals(self):
+        self.runToBreakpoint()
+
         self.expect(
             "expr --object-description -- @1",
             VARIABLES_DISPLAYED_CORRECTLY,
@@ -138,8 +225,32 @@ class ObjCNewSyntaxTestCase(TestBase):
             VARIABLES_DISPLAYED_CORRECTLY,
             substrs=["1"])
 
+    @skipUnlessDarwin
+    @expectedFailureAll(
+        oslist=['macosx'],
+        compiler='clang',
+        compiler_version=[
+            '<',
+            '7.0.0'])
+    @skipIf(macos_version=["<", "10.12"])
+    @expectedFailureAll(archs=["i[3-6]86"])
+    def test_float_literal(self):
+        self.runToBreakpoint()
+
         self.expect("expr -- @123.45", VARIABLES_DISPLAYED_CORRECTLY,
                     substrs=["NSNumber", "123.45"])
+
+    @skipUnlessDarwin
+    @expectedFailureAll(
+        oslist=['macosx'],
+        compiler='clang',
+        compiler_version=[
+            '<',
+            '7.0.0'])
+    @skipIf(macos_version=["<", "10.12"])
+    @expectedFailureAll(archs=["i[3-6]86"])
+    def test_expressions_in_literals(self):
+        self.runToBreakpoint()
 
         self.expect(
             "expr --object-description -- @( 1 + 3 )",

Modified: vendor/lldb/dist/source/Host/linux/LibcGlue.cpp
==============================================================================
--- vendor/lldb/dist/source/Host/linux/LibcGlue.cpp	Sat Jun  3 15:21:24 2017	(r319532)
+++ vendor/lldb/dist/source/Host/linux/LibcGlue.cpp	Sat Jun  3 15:21:27 2017	(r319533)
@@ -14,13 +14,13 @@
 #include <sys/syscall.h>
 #include <unistd.h>
 
-#ifndef HAVE_PROCESS_VM_READV // If the syscall wrapper is not available,
-                              // provide one.
+#if !HAVE_PROCESS_VM_READV
+// If the syscall wrapper is not available, provide one.
 ssize_t process_vm_readv(::pid_t pid, const struct iovec *local_iov,
                          unsigned long liovcnt, const struct iovec *remote_iov,
                          unsigned long riovcnt, unsigned long flags) {
-#ifdef HAVE_NR_PROCESS_VM_READV // If we have the syscall number, we can issue
-                                // the syscall ourselves.
+#if HAVE_NR_PROCESS_VM_READV
+  // If we have the syscall number, we can issue the syscall ourselves.
   return syscall(__NR_process_vm_readv, pid, local_iov, liovcnt, remote_iov,
                  riovcnt, flags);
 #else // If not, let's pretend the syscall is not present.

Modified: vendor/lldb/dist/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
==============================================================================
--- vendor/lldb/dist/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp	Sat Jun  3 15:21:24 2017	(r319532)
+++ vendor/lldb/dist/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp	Sat Jun  3 15:21:27 2017	(r319533)
@@ -33,6 +33,7 @@
 #include "lldb/Symbol/ObjectFile.h"
 #include "lldb/Symbol/SymbolFile.h"
 #include "lldb/Symbol/SymbolVendor.h"
+#include "lldb/Target/Platform.h"
 #include "lldb/Target/Process.h"
 #include "lldb/Target/Target.h"
 #include "lldb/Utility/DataBufferLLVM.h"
@@ -1762,4 +1763,80 @@ PlatformDarwin::LaunchProcess(lldb_private::ProcessLau
 
   // Let our parent class do the real launching.
   return PlatformPOSIX::LaunchProcess(launch_info);
+}
+
+lldb_private::Status
+PlatformDarwin::FindBundleBinaryInExecSearchPaths (const ModuleSpec &module_spec, Process *process, 
+                                                   ModuleSP &module_sp, 
+                                                   const FileSpecList *module_search_paths_ptr, 
+                                                   ModuleSP *old_module_sp_ptr, bool *did_create_ptr)
+{
+  const FileSpec &platform_file = module_spec.GetFileSpec();
+  // See if the file is present in any of the module_search_paths_ptr directories.
+  if (!module_sp && module_search_paths_ptr && platform_file) {
+    // create a vector of all the file / directory names in platform_file
+    // e.g. this might be
+    // /System/Library/PrivateFrameworks/UIFoundation.framework/UIFoundation
+    //
+    // We'll need to look in the module_search_paths_ptr directories for
+    // both "UIFoundation" and "UIFoundation.framework" -- most likely the
+    // latter will be the one we find there.
+
+    FileSpec platform_pull_apart(platform_file);
+    std::vector<std::string> path_parts;
+    ConstString unix_root_dir("/");
+    while (true) {
+      ConstString part = platform_pull_apart.GetLastPathComponent();
+      platform_pull_apart.RemoveLastPathComponent();
+      if (part.IsEmpty() || part == unix_root_dir)
+        break;
+      path_parts.push_back(part.AsCString());
+    }
+    const size_t path_parts_size = path_parts.size();
+
+    size_t num_module_search_paths = module_search_paths_ptr->GetSize();
+    for (size_t i = 0; i < num_module_search_paths; ++i) {
+      Log *log_verbose = lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_HOST);
+      if (log_verbose)
+          log_verbose->Printf ("PlatformRemoteDarwinDevice::GetSharedModule searching for binary in search-path %s", module_search_paths_ptr->GetFileSpecAtIndex(i).GetPath().c_str());
+      // Create a new FileSpec with this module_search_paths_ptr
+      // plus just the filename ("UIFoundation"), then the parent
+      // dir plus filename ("UIFoundation.framework/UIFoundation")
+      // etc - up to four names (to handle "Foo.framework/Contents/MacOS/Foo")
+
+      for (size_t j = 0; j < 4 && j < path_parts_size - 1; ++j) {
+        FileSpec path_to_try(module_search_paths_ptr->GetFileSpecAtIndex(i));
+
+        // Add the components backwards.  For
+        // .../PrivateFrameworks/UIFoundation.framework/UIFoundation
+        // path_parts is
+        //   [0] UIFoundation
+        //   [1] UIFoundation.framework
+        //   [2] PrivateFrameworks
+        //
+        // and if 'j' is 2, we want to append path_parts[1] and then
+        // path_parts[0], aka
+        // 'UIFoundation.framework/UIFoundation', to the module_search_paths_ptr
+        // path.
+
+        for (int k = j; k >= 0; --k) {
+          path_to_try.AppendPathComponent(path_parts[k]);
+        }
+
+        if (path_to_try.Exists()) {
+          ModuleSpec new_module_spec(module_spec);
+          new_module_spec.GetFileSpec() = path_to_try;
+          Status new_error(Platform::GetSharedModule(
+              new_module_spec, process, module_sp, NULL, old_module_sp_ptr,
+              did_create_ptr));
+
+          if (module_sp) {
+            module_sp->SetPlatformFileSpec(path_to_try);
+            return new_error;
+          }
+        }
+      }
+    }
+  }
+  return Status();
 }

Modified: vendor/lldb/dist/source/Plugins/Platform/MacOSX/PlatformDarwin.h
==============================================================================
--- vendor/lldb/dist/source/Plugins/Platform/MacOSX/PlatformDarwin.h	Sat Jun  3 15:21:24 2017	(r319532)
+++ vendor/lldb/dist/source/Plugins/Platform/MacOSX/PlatformDarwin.h	Sat Jun  3 15:21:27 2017	(r319533)
@@ -128,9 +128,15 @@ class PlatformDarwin : public PlatformPOSIX { (protect
                                              std::vector<std::string> &options,
                                              SDKType sdk_type);
 
+  const char *GetDeveloperDirectory();
+
+  lldb_private::Status
+  FindBundleBinaryInExecSearchPaths (const lldb_private::ModuleSpec &module_spec, lldb_private::Process *process,
+                                     lldb::ModuleSP &module_sp, const lldb_private::FileSpecList *module_search_paths_ptr, 
+                                     lldb::ModuleSP *old_module_sp_ptr, bool *did_create_ptr);
+
   std::string m_developer_directory;
 
-  const char *GetDeveloperDirectory();
 
 private:
   DISALLOW_COPY_AND_ASSIGN(PlatformDarwin);

Modified: vendor/lldb/dist/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp
==============================================================================
--- vendor/lldb/dist/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp	Sat Jun  3 15:21:24 2017	(r319532)
+++ vendor/lldb/dist/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp	Sat Jun  3 15:21:27 2017	(r319533)
@@ -339,5 +339,9 @@ lldb_private::Status PlatformMacOSX::GetSharedModule(
       }
     }
   }
+
+  if (!module_sp) {
+      error = FindBundleBinaryInExecSearchPaths (module_spec, process, module_sp, module_search_paths_ptr, old_module_sp_ptr, did_create_ptr);
+  }
   return error;
 }

Modified: vendor/lldb/dist/source/Plugins/Platform/MacOSX/PlatformRemoteDarwinDevice.cpp
==============================================================================
--- vendor/lldb/dist/source/Plugins/Platform/MacOSX/PlatformRemoteDarwinDevice.cpp	Sat Jun  3 15:21:24 2017	(r319532)
+++ vendor/lldb/dist/source/Plugins/Platform/MacOSX/PlatformRemoteDarwinDevice.cpp	Sat Jun  3 15:21:27 2017	(r319533)
@@ -605,70 +605,12 @@ Status PlatformRemoteDarwinDevice::GetSharedModule(
 
   // See if the file is present in any of the module_search_paths_ptr
   // directories.
-  if (!module_sp && module_search_paths_ptr && platform_file) {
-    // create a vector of all the file / directory names in platform_file
-    // e.g. this might be
-    // /System/Library/PrivateFrameworks/UIFoundation.framework/UIFoundation
-    //
-    // We'll need to look in the module_search_paths_ptr directories for
-    // both "UIFoundation" and "UIFoundation.framework" -- most likely the
-    // latter will be the one we find there.
+  if (!module_sp)
+    error = PlatformDarwin::FindBundleBinaryInExecSearchPaths (module_spec, process, module_sp,
+            module_search_paths_ptr, old_module_sp_ptr, did_create_ptr);
 
-    FileSpec platform_pull_apart(platform_file);
-    std::vector<std::string> path_parts;
-    ConstString unix_root_dir("/");
-    while (true) {
-      ConstString part = platform_pull_apart.GetLastPathComponent();
-      platform_pull_apart.RemoveLastPathComponent();
-      if (part.IsEmpty() || part == unix_root_dir)
-        break;
-      path_parts.push_back(part.AsCString());
-    }
-    const size_t path_parts_size = path_parts.size();
-
-    size_t num_module_search_paths = module_search_paths_ptr->GetSize();
-    for (size_t i = 0; i < num_module_search_paths; ++i) {
-      LLDB_LOGV(log, "searching for binary in search-path {0}",
-                module_search_paths_ptr->GetFileSpecAtIndex(i));
-      // Create a new FileSpec with this module_search_paths_ptr
-      // plus just the filename ("UIFoundation"), then the parent
-      // dir plus filename ("UIFoundation.framework/UIFoundation")
-      // etc - up to four names (to handle "Foo.framework/Contents/MacOS/Foo")
-
-      for (size_t j = 0; j < 4 && j < path_parts_size - 1; ++j) {
-        FileSpec path_to_try(module_search_paths_ptr->GetFileSpecAtIndex(i));
-
-        // Add the components backwards.  For
-        // .../PrivateFrameworks/UIFoundation.framework/UIFoundation
-        // path_parts is
-        //   [0] UIFoundation
-        //   [1] UIFoundation.framework
-        //   [2] PrivateFrameworks
-        //
-        // and if 'j' is 2, we want to append path_parts[1] and then
-        // path_parts[0], aka
-        // 'UIFoundation.framework/UIFoundation', to the module_search_paths_ptr
-        // path.
-
-        for (int k = j; k >= 0; --k) {
-          path_to_try.AppendPathComponent(path_parts[k]);
-        }
-
-        if (path_to_try.Exists()) {
-          ModuleSpec new_module_spec(module_spec);
-          new_module_spec.GetFileSpec() = path_to_try;
-          Status new_error(Platform::GetSharedModule(
-              new_module_spec, process, module_sp, NULL, old_module_sp_ptr,
-              did_create_ptr));
-
-          if (module_sp) {
-            module_sp->SetPlatformFileSpec(path_to_try);
-            return new_error;
-          }
-        }
-      }
-    }
-  }
+  if (error.Success())
+    return error;
 
   const bool always_create = false;
   error = ModuleList::GetSharedModule(

Modified: vendor/lldb/dist/source/Symbol/ClangASTContext.cpp
==============================================================================
--- vendor/lldb/dist/source/Symbol/ClangASTContext.cpp	Sat Jun  3 15:21:24 2017	(r319532)
+++ vendor/lldb/dist/source/Symbol/ClangASTContext.cpp	Sat Jun  3 15:21:27 2017	(r319533)
@@ -3938,6 +3938,11 @@ ClangASTContext::GetTypeInfo(lldb::opaque_compiler_typ
 
   const clang::Type::TypeClass type_class = qual_type->getTypeClass();
   switch (type_class) {
+  case clang::Type::Attributed:
+    return GetTypeInfo(
+        qual_type->getAs<clang::AttributedType>()
+            ->getModifiedType().getAsOpaquePtr(),
+        pointee_or_element_clang_type);
   case clang::Type::Builtin: {
     const clang::BuiltinType *builtin_type = llvm::dyn_cast<clang::BuiltinType>(
         qual_type->getCanonicalTypeInternal());

Modified: vendor/lldb/dist/unittests/CMakeLists.txt
==============================================================================
--- vendor/lldb/dist/unittests/CMakeLists.txt	Sat Jun  3 15:21:24 2017	(r319532)
+++ vendor/lldb/dist/unittests/CMakeLists.txt	Sat Jun  3 15:21:27 2017	(r319533)
@@ -40,7 +40,7 @@ function(add_lldb_unittest test_name)
     POST_BUILD
     COMMAND "${CMAKE_COMMAND}" -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/Inputs)
 
-  target_link_libraries(${test_name} ${ARG_LINK_LIBS} ${CLANG_USED_LIBS} ${LLDB_SYSTEM_LIBS})
+  target_link_libraries(${test_name} ${ARG_LINK_LIBS} ${LLDB_SYSTEM_LIBS})
 endfunction()
 
 function(add_unittest_inputs test_name inputs)


More information about the svn-src-all mailing list