diff options
author | Serge Guelton <sguelton@redhat.com> | 2019-03-25 15:18:55 +0000 |
---|---|---|
committer | Serge Guelton <sguelton@redhat.com> | 2019-03-25 15:18:55 +0000 |
commit | dcb128f73b8d48e93dbfb8bde611a3e70ca6e774 (patch) | |
tree | 7fe1754b3a46b7fd369ffba6aa7c2181054ba6e3 | |
parent | b833c6af5911ca71c555771097a03643660c1643 (diff) | |
download | bcm5719-llvm-dcb128f73b8d48e93dbfb8bde611a3e70ca6e774.tar.gz bcm5719-llvm-dcb128f73b8d48e93dbfb8bde611a3e70ca6e774.zip |
Revert 356905
Commited from wrong directory...
llvm-svn: 356907
-rw-r--r-- | llvm/tools/llvm-config/llvm-config.cpp | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/llvm/tools/llvm-config/llvm-config.cpp b/llvm/tools/llvm-config/llvm-config.cpp index 25f1c28e5f0..7ef7c46a262 100644 --- a/llvm/tools/llvm-config/llvm-config.cpp +++ b/llvm/tools/llvm-config/llvm-config.cpp @@ -268,6 +268,7 @@ int main(int argc, char **argv) { // tree. bool IsInDevelopmentTree; enum { CMakeStyle, CMakeBuildModeStyle } DevelopmentTreeLayout; + llvm::SmallString<256> CurrentPath(GetExecutablePath(argv[0])); std::string CurrentExecPrefix; std::string ActiveObjRoot; @@ -278,18 +279,11 @@ int main(int argc, char **argv) { build_mode = CMAKE_CFG_INTDIR; #endif - // Create an absolute path, and pop up as much directory as in - // LLVM_TOOLS_INSTALL_DIR - { - llvm::SmallString<256> CurrentPath(GetExecutablePath(argv[0])); - sys::fs::make_absolute(CurrentPath); - for (auto iter = sys::path::begin(LLVM_TOOLS_INSTALL_DIR), - end = sys::path::end(LLVM_TOOLS_INSTALL_DIR); - iter != end; ++iter) { - CurrentPath = sys::path::parent_path(CurrentPath).str(); - } - CurrentExecPrefix = sys::path::parent_path(CurrentPath).str(); - } + // Create an absolute path, and pop up one directory (we expect to be inside a + // bin dir). + sys::fs::make_absolute(CurrentPath); + CurrentExecPrefix = + sys::path::parent_path(sys::path::parent_path(CurrentPath)).str(); // Check to see if we are inside a development tree by comparing to possible // locations (prefix style or CMake style). |