paperchalice created this revision. paperchalice added a reviewer: aprantl. Herald added a project: All. paperchalice requested review of this revision. Herald added a project: LLDB. Herald added a subscriber: lldb-commits.
The lifetime of `clang_resource_path` should be same as `kResourceDirSuffixes`, because `kResourceDirSuffixes` doesn't own `clang_resource_path`. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D152225 Files: lldb/source/Plugins/ExpressionParser/Clang/ClangHost.cpp Index: lldb/source/Plugins/ExpressionParser/Clang/ClangHost.cpp =================================================================== --- lldb/source/Plugins/ExpressionParser/Clang/ClangHost.cpp +++ lldb/source/Plugins/ExpressionParser/Clang/ClangHost.cpp @@ -52,7 +52,7 @@ Log *log = GetLog(LLDBLog::Host); std::string raw_path = lldb_shlib_spec.GetPath(); llvm::StringRef parent_dir = llvm::sys::path::parent_path(raw_path); - const std::string clang_resource_path = + static const std::string clang_resource_path = clang::driver::Driver::GetResourcesPath("bin/lldb", CLANG_RESOURCE_DIR); static const llvm::StringRef kResourceDirSuffixes[] = {
Index: lldb/source/Plugins/ExpressionParser/Clang/ClangHost.cpp =================================================================== --- lldb/source/Plugins/ExpressionParser/Clang/ClangHost.cpp +++ lldb/source/Plugins/ExpressionParser/Clang/ClangHost.cpp @@ -52,7 +52,7 @@ Log *log = GetLog(LLDBLog::Host); std::string raw_path = lldb_shlib_spec.GetPath(); llvm::StringRef parent_dir = llvm::sys::path::parent_path(raw_path); - const std::string clang_resource_path = + static const std::string clang_resource_path = clang::driver::Driver::GetResourcesPath("bin/lldb", CLANG_RESOURCE_DIR); static const llvm::StringRef kResourceDirSuffixes[] = {
_______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits