[Lldb-commits] [lldb] ad4e7b9 - Fix an oversight in GetXcodeContentsDirectory()
Adrian Prantl via lldb-commits
lldb-commits at lists.llvm.org
Fri Jun 5 13:50:55 PDT 2020
Author: Adrian Prantl
Date: 2020-06-05T13:50:37-07:00
New Revision: ad4e7b9dc82b13d124071f0add09cb541b495a0e
URL: https://github.com/llvm/llvm-project/commit/ad4e7b9dc82b13d124071f0add09cb541b495a0e
DIFF: https://github.com/llvm/llvm-project/commit/ad4e7b9dc82b13d124071f0add09cb541b495a0e.diff
LOG: Fix an oversight in GetXcodeContentsDirectory()
Since FindXcodeContentsDirectoryInPath expects the *.app/Contents and
DEVELOPER_DIR is supposed to point to Xcode.app, we need to append the
Contents path first.
Differential Revision: https://reviews.llvm.org/D81290
Added:
Modified:
lldb/source/Host/macosx/objcxx/HostInfoMacOSX.mm
Removed:
################################################################################
diff --git a/lldb/source/Host/macosx/objcxx/HostInfoMacOSX.mm b/lldb/source/Host/macosx/objcxx/HostInfoMacOSX.mm
index 37bcff24ba23..fd88d0c31de6 100644
--- a/lldb/source/Host/macosx/objcxx/HostInfoMacOSX.mm
+++ b/lldb/source/Host/macosx/objcxx/HostInfoMacOSX.mm
@@ -326,9 +326,9 @@ static void ParseOSVersion(llvm::VersionTuple &version, NSString *Key) {
}
}
- std::string env_developer_dir = GetEnvDeveloperDir();
+ llvm::SmallString<128> env_developer_dir(GetEnvDeveloperDir());
if (!env_developer_dir.empty()) {
- // FIXME: This looks like it couldn't possibly work!
+ llvm::sys::path::append(env_developer_dir, "Contents");
std::string xcode_contents_dir =
XcodeSDK::FindXcodeContentsDirectoryInPath(env_developer_dir);
if (!xcode_contents_dir.empty()) {
More information about the lldb-commits
mailing list