Better validation when we think a directory might be Xcode.app.
LLDB could otherwise get confused if it is (for example) in a root that is meant to install into an Xcode.app but hasn't been installed yet. That way Xcode can fall back to the real Xcode.app rather than trying to look for resources inside the root. llvm-svn: 252198
This commit is contained in:
parent
4bf262a0f2
commit
a95b131c9b
|
@ -1225,7 +1225,16 @@ CheckPathForXcode(const FileSpec &fspec)
|
|||
if (pos != std::string::npos)
|
||||
{
|
||||
path_to_shlib.erase(pos + strlen(substr));
|
||||
return FileSpec(path_to_shlib.c_str(), false);
|
||||
FileSpec ret (path_to_shlib.c_str(), false);
|
||||
|
||||
FileSpec xcode_binary_path = ret;
|
||||
xcode_binary_path.AppendPathComponent("MacOS");
|
||||
xcode_binary_path.AppendPathComponent("Xcode");
|
||||
|
||||
if (xcode_binary_path.Exists())
|
||||
{
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
}
|
||||
return FileSpec();
|
||||
|
|
Loading…
Reference in New Issue