This is an archive of the discontinued LLVM Phabricator instance.

Eliminate unnecessary file access checks in Clang driver on Windows
ClosedPublic

Authored by amccarth on May 19 2016, 3:57 PM.

Details

Summary

This fixes the problem where the driver will look for cl.exe.exe while walking the PATH.

I looked into changing the Windows implementation of llvm::sys::fs::can_execute(), but there wasn't a satisfying way to preserve the extra checks for the callers that depend on it. I also looked into having it actually check that the file is an executable, but this seemed to add little value at the cost of more file i/o.

Diff Detail

Repository
rL LLVM

Event Timeline

amccarth updated this revision to Diff 57872.May 19 2016, 3:57 PM
amccarth retitled this revision from to Eliminate unnecessary file access checks in Clang driver on Windows.
amccarth updated this object.
amccarth added a reviewer: majnemer.
amccarth added a subscriber: cfe-commits.
majnemer accepted this revision.May 19 2016, 4:00 PM
majnemer edited edge metadata.

LGTM

This revision is now accepted and ready to land.May 19 2016, 4:00 PM
This revision was automatically updated to reflect the committed changes.