[Lldb-commits] [PATCH] D81290: Fix an oversight in GetXcodeContentsDirectory()
Adrian Prantl via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Fri Jun 5 11:45:30 PDT 2020
aprantl created this revision.
aprantl added a reviewer: JDevlieghere.
Since FindXcodeContentsDirectoryInPath expects the *.app/Contents and DEVELOPER_DIR is supposed to point to Xcode.app, we need to append the Contents path first.
https://reviews.llvm.org/D81290
Files:
lldb/source/Host/macosx/objcxx/HostInfoMacOSX.mm
Index: lldb/source/Host/macosx/objcxx/HostInfoMacOSX.mm
===================================================================
--- lldb/source/Host/macosx/objcxx/HostInfoMacOSX.mm
+++ lldb/source/Host/macosx/objcxx/HostInfoMacOSX.mm
@@ -326,9 +326,9 @@
}
}
- 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()) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D81290.268894.patch
Type: text/x-patch
Size: 714 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20200605/2f5c2925/attachment.bin>
More information about the lldb-commits
mailing list