Skip to content

Commit ad4e7b9

Browse files
committed
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
1 parent f28177d commit ad4e7b9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lldb/source/Host/macosx/objcxx/HostInfoMacOSX.mm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -326,9 +326,9 @@ static void ParseOSVersion(llvm::VersionTuple &version, NSString *Key) {
326326
}
327327
}
328328

329-
std::string env_developer_dir = GetEnvDeveloperDir();
329+
llvm::SmallString<128> env_developer_dir(GetEnvDeveloperDir());
330330
if (!env_developer_dir.empty()) {
331-
// FIXME: This looks like it couldn't possibly work!
331+
llvm::sys::path::append(env_developer_dir, "Contents");
332332
std::string xcode_contents_dir =
333333
XcodeSDK::FindXcodeContentsDirectoryInPath(env_developer_dir);
334334
if (!xcode_contents_dir.empty()) {

0 commit comments

Comments
 (0)