diff options
-rw-r--r-- | lldb/source/Host/common/FileSystem.cpp | 7 | ||||
-rw-r--r-- | lldb/unittests/ScriptInterpreter/Python/PythonTestSuite.cpp | 2 |
2 files changed, 6 insertions, 3 deletions
diff --git a/lldb/source/Host/common/FileSystem.cpp b/lldb/source/Host/common/FileSystem.cpp index aa181ecdd11..5f8d8fb4282 100644 --- a/lldb/source/Host/common/FileSystem.cpp +++ b/lldb/source/Host/common/FileSystem.cpp @@ -9,6 +9,7 @@ #include "lldb/Host/FileSystem.h" +#include "lldb/Utility/LLDBAssert.h" #include "lldb/Utility/TildeExpressionResolver.h" #include "llvm/Support/FileSystem.h" @@ -25,17 +26,17 @@ using namespace llvm; FileSystem &FileSystem::Instance() { return *InstanceImpl(); } void FileSystem::Initialize() { - assert(!InstanceImpl()); + lldbassert(!InstanceImpl() && "Already initialized."); InstanceImpl().emplace(); } void FileSystem::Initialize(IntrusiveRefCntPtr<vfs::FileSystem> fs) { - assert(!InstanceImpl()); + lldbassert(!InstanceImpl() && "Already initialized."); InstanceImpl().emplace(fs); } void FileSystem::Terminate() { - assert(InstanceImpl()); + lldbassert(InstanceImpl() && "Already terminated."); InstanceImpl().reset(); } diff --git a/lldb/unittests/ScriptInterpreter/Python/PythonTestSuite.cpp b/lldb/unittests/ScriptInterpreter/Python/PythonTestSuite.cpp index 66680f10563..7bc8f64b485 100644 --- a/lldb/unittests/ScriptInterpreter/Python/PythonTestSuite.cpp +++ b/lldb/unittests/ScriptInterpreter/Python/PythonTestSuite.cpp @@ -38,4 +38,6 @@ void PythonTestSuite::TearDown() { PyGILState_Release(m_gil_state); ScriptInterpreterPython::Terminate(); + HostInfoBase::Terminate(); + FileSystem::Terminate(); } |