summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-config
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2013-06-26 05:01:35 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2013-06-26 05:01:35 +0000
commite03dfd9b0a176d1f7cb0c662263a13a9c7c30b7e (patch)
treeb9b09feb60cd9fd96dd75a6638a04192cdf77f2f /llvm/tools/llvm-config
parent399ab33a37ab0cf08c0e35052820ea2b7e1d2e24 (diff)
downloadbcm5719-llvm-e03dfd9b0a176d1f7cb0c662263a13a9c7c30b7e.tar.gz
bcm5719-llvm-e03dfd9b0a176d1f7cb0c662263a13a9c7c30b7e.zip
Port GetMainExecutable over to PathV2.
I will remove the V1 version as soon as I change clang in the next commit. llvm-svn: 184914
Diffstat (limited to 'llvm/tools/llvm-config')
-rw-r--r--llvm/tools/llvm-config/llvm-config.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/tools/llvm-config/llvm-config.cpp b/llvm/tools/llvm-config/llvm-config.cpp
index 5151d1a0911..fc3ab68f7d8 100644
--- a/llvm/tools/llvm-config/llvm-config.cpp
+++ b/llvm/tools/llvm-config/llvm-config.cpp
@@ -162,11 +162,11 @@ Typical components:\n\
}
/// \brief Compute the path to the main executable.
-llvm::sys::Path GetExecutablePath(const char *Argv0) {
+std::string GetExecutablePath(const char *Argv0) {
// This just needs to be some symbol in the binary; C++ doesn't
// allow taking the address of ::main however.
void *P = (void*) (intptr_t) GetExecutablePath;
- return llvm::sys::Path::GetMainExecutable(Argv0, P);
+ return llvm::sys::fs::getMainExecutable(Argv0, P);
}
int main(int argc, char **argv) {
@@ -180,7 +180,7 @@ int main(int argc, char **argv) {
// tree.
bool IsInDevelopmentTree;
enum { MakefileStyle, CMakeStyle, CMakeBuildModeStyle } DevelopmentTreeLayout;
- llvm::SmallString<256> CurrentPath(GetExecutablePath(argv[0]).str());
+ llvm::SmallString<256> CurrentPath(GetExecutablePath(argv[0]));
std::string CurrentExecPrefix;
std::string ActiveObjRoot;
OpenPOWER on IntegriCloud