summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2013-06-26 06:10:32 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2013-06-26 06:10:32 +0000
commit255aa3c1545889903ccd0408419840782a59471f (patch)
treedfb1af89396778731344d8e121b847f9c1ba5afa
parent903701dfb7b03b9390c763bb1e2c0b64eec60a30 (diff)
downloadllvm-255aa3c1545889903ccd0408419840782a59471f.tar.gz
llvm-255aa3c1545889903ccd0408419840782a59471f.tar.bz2
llvm-255aa3c1545889903ccd0408419840782a59471f.tar.xz
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
-rw-r--r--lib/Support/Unix/PathV2.inc6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Support/Unix/PathV2.inc b/lib/Support/Unix/PathV2.inc
index 588f9e8dd1..29a89b03d0 100644
--- a/lib/Support/Unix/PathV2.inc
+++ b/lib/Support/Unix/PathV2.inc
@@ -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