[Lldb-commits] [PATCH] D62755: [Target] Remove Process::GetCPPLanguageRuntime
Alex Langford via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Tue Jun 4 13:14:37 PDT 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rL362544: [Target] Remove Process::GetCPPLanguageRuntime (authored by xiaobai, committed by ).
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D62755/new/
https://reviews.llvm.org/D62755
Files:
lldb/trunk/include/lldb/Target/CPPLanguageRuntime.h
lldb/trunk/include/lldb/Target/Process.h
lldb/trunk/include/lldb/lldb-forward.h
lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxx.cpp
lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp
lldb/trunk/source/Target/Process.cpp
Index: lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxx.cpp
===================================================================
--- lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxx.cpp
+++ lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxx.cpp
@@ -67,7 +67,8 @@
if (process == nullptr)
return false;
- CPPLanguageRuntime *cpp_runtime = process->GetCPPLanguageRuntime();
+ CPPLanguageRuntime *cpp_runtime =
+ CPPLanguageRuntime::GetCPPLanguageRuntime(*process);
if (!cpp_runtime)
return false;
Index: lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp
===================================================================
--- lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp
+++ lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp
@@ -462,7 +462,7 @@
ValueObjectSP AppleObjCRuntime::GetExceptionObjectForThread(
ThreadSP thread_sp) {
- auto cpp_runtime = m_process->GetCPPLanguageRuntime();
+ auto *cpp_runtime = m_process->GetLanguageRuntime(eLanguageTypeC_plus_plus);
if (!cpp_runtime) return ValueObjectSP();
auto cpp_exception = cpp_runtime->GetExceptionObjectForThread(thread_sp);
if (!cpp_exception) return ValueObjectSP();
Index: lldb/trunk/source/Target/Process.cpp
===================================================================
--- lldb/trunk/source/Target/Process.cpp
+++ lldb/trunk/source/Target/Process.cpp
@@ -1598,16 +1598,6 @@
return runtime;
}
-CPPLanguageRuntime *Process::GetCPPLanguageRuntime(bool retry_if_null) {
- std::lock_guard<std::recursive_mutex> guard(m_language_runtimes_mutex);
- LanguageRuntime *runtime =
- GetLanguageRuntime(eLanguageTypeC_plus_plus, retry_if_null);
- if (!runtime)
- return nullptr;
-
- return static_cast<CPPLanguageRuntime *>(runtime);
-}
-
ObjCLanguageRuntime *Process::GetObjCLanguageRuntime(bool retry_if_null) {
std::lock_guard<std::recursive_mutex> guard(m_language_runtimes_mutex);
LanguageRuntime *runtime =
Index: lldb/trunk/include/lldb/Target/CPPLanguageRuntime.h
===================================================================
--- lldb/trunk/include/lldb/Target/CPPLanguageRuntime.h
+++ lldb/trunk/include/lldb/Target/CPPLanguageRuntime.h
@@ -43,6 +43,11 @@
return lldb::eLanguageTypeC_plus_plus;
}
+ static CPPLanguageRuntime *GetCPPLanguageRuntime(Process &process) {
+ return static_cast<CPPLanguageRuntime *>(
+ process.GetLanguageRuntime(lldb::eLanguageTypeC_plus_plus));
+ }
+
virtual bool IsVTableName(const char *name) = 0;
bool GetObjectDescription(Stream &str, ValueObject &object) override;
Index: lldb/trunk/include/lldb/Target/Process.h
===================================================================
--- lldb/trunk/include/lldb/Target/Process.h
+++ lldb/trunk/include/lldb/Target/Process.h
@@ -2184,8 +2184,6 @@
LanguageRuntime *GetLanguageRuntime(lldb::LanguageType language,
bool retry_if_null = true);
- CPPLanguageRuntime *GetCPPLanguageRuntime(bool retry_if_null = true);
-
ObjCLanguageRuntime *GetObjCLanguageRuntime(bool retry_if_null = true);
bool IsPossibleDynamicValue(ValueObject &in_value);
Index: lldb/trunk/include/lldb/lldb-forward.h
===================================================================
--- lldb/trunk/include/lldb/lldb-forward.h
+++ lldb/trunk/include/lldb/lldb-forward.h
@@ -43,7 +43,6 @@
class BroadcastEventSpec;
class Broadcaster;
class BroadcasterManager;
-class CPPLanguageRuntime;
class ClangASTContext;
class ClangASTImporter;
class ClangASTMetadata;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D62755.203004.patch
Type: text/x-patch
Size: 3648 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20190604/cd516a76/attachment.bin>
More information about the lldb-commits
mailing list