On FreeBSD use AT_EXECPATH from ELF auxiliary vectors for getExecutablePath
authorEd Maste <emaste@freebsd.org>
Wed, 13 Nov 2019 18:24:23 +0000 (13:24 -0500)
committerEd Maste <emaste@freebsd.org>
Thu, 14 Nov 2019 14:48:48 +0000 (09:48 -0500)
commita0a38b81ea911f1cd4e400f1ab54dd4930598a7c
tree4cc476d6293554ff2da8cc978a9eb78588be6e0b
parent232cdb3d3018b4bda60a2a62c3b071ad3af8bd35
On FreeBSD use AT_EXECPATH from ELF auxiliary vectors for getExecutablePath

/proc/curproc/file and the KERN_PROC_PATHNAME sysctl may not return the
desired path if there are multiple hardlinks to the file, or if the path has
expired from the namecache.

Reviewed By: theraven

Differential Revision: https://reviews.llvm.org/D70198
llvm/lib/Support/Unix/Path.inc