[HIP] use GetProgramPath for executable discovery

Authored by DieGoldeneEnte on Jan 21 2020, 9:27 AM.

Unpublished Commit · Learn More

Not On Permanent Ref: This commit is not an ancestor of any permanent ref.


[HIP] use GetProgramPath for executable discovery

This change replaces the manual building of executable paths
using llvm::sys::path::append with GetProgramPath.
This enables adding other paths in case executables reside
in different directories and makes the code easier to read.

Differential Revision: https://reviews.llvm.org/D72903

(cherry picked from commit 24d7a0935bea390fc444f6ac8cf02447fe8d6917)