diff options
author | Daniel Dunbar <daniel@zuster.org> | 2010-08-01 22:29:51 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2010-08-01 22:29:51 +0000 |
commit | edf29b00bc1641034b38be92146e15f0625a45d2 (patch) | |
tree | 9bf6bd746bf8432037a4948e33e448c92f32ceca /include/clang | |
parent | 5633c1e4a7a5dd6dc5a4468f1660fabe70b0d2f8 (diff) |
Driver: Keep track of a separate "install dir", which is the path where clang
was invoked from (which may not be where the executable itself is).
- This allows having e.g., /Developer/usr/bin/clang be a symlink to some other
location, while still making sure the Driver finds 'as', 'ld', etc. relative
to itself.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109989 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang')
-rw-r--r-- | include/clang/Driver/Driver.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/clang/Driver/Driver.h b/include/clang/Driver/Driver.h index 056031b6b4..07f912348b 100644 --- a/include/clang/Driver/Driver.h +++ b/include/clang/Driver/Driver.h @@ -65,6 +65,9 @@ public: /// The original path to the clang executable. std::string ClangExecutable; + /// The path to the installed clang directory, if any. + std::string InstalledDir; + /// The path to the compiler resource directory. std::string ResourceDir; @@ -171,6 +174,16 @@ public: return ClangExecutable.c_str(); } + /// \brief Get the path to where the clang executable was installed. + const char *getInstalledDir() const { + if (!InstalledDir.empty()) + return InstalledDir.c_str(); + return Dir.c_str(); + } + void setInstalledDir(llvm::StringRef Value) { + InstalledDir = Value; + } + /// @} /// @name Primary Functionality /// @{ |