[all-commits] [llvm/llvm-project] 7aa289: [lldb/PlatformDarwin] Be more robust in computing ...

Jonas Devlieghere via All-commits all-commits at lists.llvm.org
Tue Mar 17 14:42:13 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 7aa28995e87f6cec2e02608c978885cf01dcc65d
      https://github.com/llvm/llvm-project/commit/7aa28995e87f6cec2e02608c978885cf01dcc65d
  Author: Jonas Devlieghere <jonas at devlieghere.com>
  Date:   2020-03-17 (Tue, 17 Mar 2020)

  Changed paths:
    M lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
    M lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.h
    M lldb/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp
    M lldb/unittests/Platform/PlatformDarwinTest.cpp

  Log Message:
  -----------
  [lldb/PlatformDarwin] Be more robust in computing the SDK path with xcrun

The current implementation isn't very resilient when it comes to the
output of xcrun. Currently it cannot deal with:

 - Trailing newlines.
 - Leading newlines and errors/warnings before the Xcode path.
 - Xcode not being named Xcode.app.

This extract the logic into a helper in PlatformDarwin and fixes those
issues. It's also the first step towards removing code duplication
between the different platforms and downstream Swift.

Differential revision: https://reviews.llvm.org/D76261




More information about the All-commits mailing list