Try to use /proc on FreeBSD for getExecutablePath
authorDavid Chisnall <csdavec@swan.ac.uk>
Mon, 29 Apr 2019 09:24:51 +0000 (09:24 +0000)
committerDavid Chisnall <csdavec@swan.ac.uk>
Mon, 29 Apr 2019 09:24:51 +0000 (09:24 +0000)
commit714a4425de37c9e5d592ba29b5aad1b55761051d
treedd230e8bfcd46a21c734cf280bcb5de34ee2ffb5
parent055aee1d8a75e9414d0662c4d9f4b8f0393f6100
Try to use /proc on FreeBSD for getExecutablePath

Currently, clang's libTooling passes this function a fake argv0, which
means that no libTooling tools can find the standard headers on FreeBSD.
With this change, these will now work on any FreeBSD systems that have
procfs mounted.  This isn't the right fix for the libTooling issue, but
it does bring the FreeBSD implementation of getExecutablePath closer to
the Linux and macOS implementations.

llvm-svn: 359427
llvm/lib/Support/Unix/Path.inc