diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2019-08-20 20:51:52 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2019-08-20 20:51:52 +0000 |
commit | 5f29bb8a675e8f96452b632e7129113f7dec850e (patch) | |
tree | 3d3f2a0d3ad10872a4dcaba8ec8d1d20c87ab147 /source/Interpreter/OptionValueFileSpecLIst.cpp | |
parent | 88c643b6fec27eec436c8d138fee6346e92337d6 (diff) |
Notes
Diffstat (limited to 'source/Interpreter/OptionValueFileSpecLIst.cpp')
-rw-r--r-- | source/Interpreter/OptionValueFileSpecLIst.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/source/Interpreter/OptionValueFileSpecLIst.cpp b/source/Interpreter/OptionValueFileSpecLIst.cpp index fd78bba94fef..a95188870f0b 100644 --- a/source/Interpreter/OptionValueFileSpecLIst.cpp +++ b/source/Interpreter/OptionValueFileSpecLIst.cpp @@ -1,9 +1,8 @@ //===-- OptionValueFileSpecLIst.cpp -----------------------------*- C++ -*-===// // -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// @@ -18,6 +17,7 @@ using namespace lldb_private; void OptionValueFileSpecList::DumpValue(const ExecutionContext *exe_ctx, Stream &strm, uint32_t dump_mask) { + std::lock_guard<std::recursive_mutex> lock(m_mutex); if (dump_mask & eDumpOptionType) strm.Printf("(%s)", GetTypeAsCString()); if (dump_mask & eDumpOptionValue) { @@ -44,6 +44,7 @@ void OptionValueFileSpecList::DumpValue(const ExecutionContext *exe_ctx, Status OptionValueFileSpecList::SetValueFromString(llvm::StringRef value, VarSetOperationType op) { + std::lock_guard<std::recursive_mutex> lock(m_mutex); Status error; Args args(value.str()); const size_t argc = args.GetArgumentCount(); @@ -164,5 +165,6 @@ Status OptionValueFileSpecList::SetValueFromString(llvm::StringRef value, } lldb::OptionValueSP OptionValueFileSpecList::DeepCopy() const { - return OptionValueSP(new OptionValueFileSpecList(*this)); + std::lock_guard<std::recursive_mutex> lock(m_mutex); + return OptionValueSP(new OptionValueFileSpecList(m_current_value)); } |