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:
Rafael Espindola 2013-06-26 06:10:32 +00:00
parent 903701dfb7
commit 255aa3c154

View File

@ -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