forked from OSchip/llvm-project
[Target] Generalize some behavior in Target::SymbolsDidLoad
Summary: SymbolsDidLoad is currently only implemented for ObjCLanguageRuntime, but that doesn't mean that it couldn't be useful for other Langauges. Although this change seems like it's generalizing for the sake of purity, this removes Target's dependency on ObjCLanguageRuntime. Differential Revision: https://reviews.llvm.org/D62796 llvm-svn: 362461
This commit is contained in:
parent
b3650868f6
commit
b978f72058
|
@ -143,6 +143,8 @@ public:
|
|||
return false;
|
||||
}
|
||||
|
||||
virtual void SymbolsDidLoad(const ModuleList &module_list) { return; }
|
||||
|
||||
virtual lldb::ThreadPlanSP GetStepThroughTrampolinePlan(Thread &thread,
|
||||
bool stop_others) = 0;
|
||||
|
||||
|
|
|
@ -275,7 +275,7 @@ public:
|
|||
return (m_has_new_literals_and_indexing == eLazyBoolYes);
|
||||
}
|
||||
|
||||
virtual void SymbolsDidLoad(const ModuleList &module_list) {
|
||||
void SymbolsDidLoad(const ModuleList &module_list) override {
|
||||
m_negative_complete_class_cache.clear();
|
||||
}
|
||||
|
||||
|
|
|
@ -43,7 +43,6 @@
|
|||
#include "lldb/Symbol/Symbol.h"
|
||||
#include "lldb/Target/Language.h"
|
||||
#include "lldb/Target/LanguageRuntime.h"
|
||||
#include "lldb/Target/ObjCLanguageRuntime.h"
|
||||
#include "lldb/Target/Process.h"
|
||||
#include "lldb/Target/SectionLoadList.h"
|
||||
#include "lldb/Target/StackFrame.h"
|
||||
|
@ -1668,11 +1667,8 @@ void Target::ModulesDidLoad(ModuleList &module_list) {
|
|||
void Target::SymbolsDidLoad(ModuleList &module_list) {
|
||||
if (m_valid && module_list.GetSize()) {
|
||||
if (m_process_sp) {
|
||||
LanguageRuntime *runtime =
|
||||
m_process_sp->GetLanguageRuntime(lldb::eLanguageTypeObjC);
|
||||
if (runtime) {
|
||||
ObjCLanguageRuntime *objc_runtime = (ObjCLanguageRuntime *)runtime;
|
||||
objc_runtime->SymbolsDidLoad(module_list);
|
||||
for (LanguageRuntime *runtime : m_process_sp->GetLanguageRuntimes()) {
|
||||
runtime->SymbolsDidLoad(module_list);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue