summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/SystemUtils.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2013-06-14 15:12:13 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2013-06-14 15:12:13 +0000
commitb786304fea49d01084b50e325847792ef10091f4 (patch)
tree33aa7eb74522175c88959f5634ee513d331a4149 /llvm/lib/Support/SystemUtils.cpp
parent9aa3d5d7b23fa3dd076932b5b48048a5e8d40da5 (diff)
downloadbcm5719-llvm-b786304fea49d01084b50e325847792ef10091f4.tar.gz
bcm5719-llvm-b786304fea49d01084b50e325847792ef10091f4.zip
Move PrependMainExecutablePath next to its only user.
llvm-svn: 183980
Diffstat (limited to 'llvm/lib/Support/SystemUtils.cpp')
-rw-r--r--llvm/lib/Support/SystemUtils.cpp23
1 files changed, 0 insertions, 23 deletions
diff --git a/llvm/lib/Support/SystemUtils.cpp b/llvm/lib/Support/SystemUtils.cpp
index b13b57114bf..2036364dc51 100644
--- a/llvm/lib/Support/SystemUtils.cpp
+++ b/llvm/lib/Support/SystemUtils.cpp
@@ -13,7 +13,6 @@
//===----------------------------------------------------------------------===//
#include "llvm/Support/SystemUtils.h"
-#include "llvm/Support/PathV1.h"
#include "llvm/Support/Process.h"
#include "llvm/Support/Program.h"
#include "llvm/Support/raw_ostream.h"
@@ -32,25 +31,3 @@ bool llvm::CheckBitcodeOutputToConsole(raw_ostream &stream_to_check,
}
return false;
}
-
-/// PrependMainExecutablePath - Prepend the path to the program being executed
-/// to \p ExeName, given the value of argv[0] and the address of main()
-/// itself. This allows us to find another LLVM tool if it is built in the same
-/// directory. An empty string is returned on error; note that this function
-/// just mainpulates the path and doesn't check for executability.
-/// @brief Find a named executable.
-sys::Path llvm::PrependMainExecutablePath(const std::string &ExeName,
- const char *Argv0, void *MainAddr) {
- // Check the directory that the calling program is in. We can do
- // this if ProgramPath contains at least one / character, indicating that it
- // is a relative path to the executable itself.
- sys::Path Result = sys::Path::GetMainExecutable(Argv0, MainAddr);
- Result.eraseComponent();
-
- if (!Result.isEmpty()) {
- Result.appendComponent(ExeName);
- Result.appendSuffix(sys::Path::GetEXESuffix());
- }
-
- return Result;
-}
OpenPOWER on IntegriCloud