aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2009-10-19 10:20:24 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2009-10-19 10:20:24 +0000
commitc5a9e9511e4501a5c4858b1ce1b9f09db2d1ca3a (patch)
tree1d428f8fb52e429a27d880f00008e6aa67600424
parent06d10728b86ebb2bd73b593146e95e0c1688acc4 (diff)
CIndex: make variable non-static to avoid potential race conditions, per
Daniel's comment. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84484 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--tools/CIndex/CIndex.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/tools/CIndex/CIndex.cpp b/tools/CIndex/CIndex.cpp
index 8f6529e00d..420c006298 100644
--- a/tools/CIndex/CIndex.cpp
+++ b/tools/CIndex/CIndex.cpp
@@ -283,14 +283,12 @@ public:
void setOnlyLocalDecls(bool Local = true) { OnlyLocalDecls = Local; }
/// \brief Get the path of the clang binary.
- static const llvm::sys::Path& getClangPath();
+ const llvm::sys::Path& getClangPath();
private:
bool OnlyLocalDecls;
- static llvm::sys::Path ClangPath;
+ llvm::sys::Path ClangPath;
};
-llvm::sys::Path CIndexer::ClangPath;
-
const llvm::sys::Path& CIndexer::getClangPath() {
// Did we already compute the path?
if (!ClangPath.empty())