llvm.org GIT mirror llvm / ac2d2e0
Tweak r199835 to use can_execute() instead of exists() The execution code path crashes if it can't execute the binary so we might as well take precautions here. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199844 91177308-0d34-0410-b5e6-96231b3b80d8 Alp Toker 6 years ago
1 changed file(s) with 3 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
667667 << " Defaulting to simulated remote execution\n";
668668 Target.reset(RemoteTarget::createRemoteTarget());
669669 } else {
670 if (!sys::fs::exists(ChildExecPath)) {
671 errs() << "Unable to find child target: '" << ChildExecPath << "'\n";
670 if (!sys::fs::can_execute(ChildExecPath)) {
671 errs() << "Unable to find usable child executable: '" << ChildExecPath
672 << "'\n";
672673 return -1;
673674 }
674675 Target.reset(RemoteTarget::createExternalRemoteTarget(ChildExecPath));