mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-29 13:32:33 +00:00
Remove calls to Path in #ifdefs that don't seem to be used in any of the bots :-(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184920 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
903701dfb7
commit
255aa3c154
@ -188,7 +188,7 @@ std::string getMainExecutable(const char *argv0, void *MainAddr) {
|
||||
char exe_path[PATH_MAX];
|
||||
|
||||
if (getprogpath(exe_path, argv0) != NULL)
|
||||
return Path(exe_path);
|
||||
return exe_path;
|
||||
#elif defined(__linux__) || defined(__CYGWIN__)
|
||||
char exe_path[MAXPATHLEN];
|
||||
StringRef aPath("/proc/self/exe");
|
||||
@ -207,13 +207,13 @@ std::string getMainExecutable(const char *argv0, void *MainAddr) {
|
||||
Dl_info DLInfo;
|
||||
int err = dladdr(MainAddr, &DLInfo);
|
||||
if (err == 0)
|
||||
return Path();
|
||||
return "";
|
||||
|
||||
// If the filename is a symlink, we need to resolve and return the location of
|
||||
// the actual executable.
|
||||
char link_path[MAXPATHLEN];
|
||||
if (realpath(DLInfo.dli_fname, link_path))
|
||||
return Path(link_path);
|
||||
return link_path;
|
||||
#else
|
||||
#error GetMainExecutable is not implemented on this host yet.
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user