diff options
author | Alex Langford <apl@fb.com> | 2019-06-21 19:43:07 +0000 |
---|---|---|
committer | Alex Langford <apl@fb.com> | 2019-06-21 19:43:07 +0000 |
commit | 7f9c9f2264235f94b5496281cadcc4a9775dbd8f (patch) | |
tree | f3818af590c4ba9fa489cd7608295d057673e250 /lldb/source/Target/ObjCLanguageRuntime.cpp | |
parent | 4649a051bf0b80732ebe805c65a40756e883df6a (diff) | |
download | bcm5719-llvm-7f9c9f2264235f94b5496281cadcc4a9775dbd8f.tar.gz bcm5719-llvm-7f9c9f2264235f94b5496281cadcc4a9775dbd8f.zip |
[Target] Decouple ObjCLanguageRuntime from LanguageRuntime
Summary:
ObjCLanguageRuntime was being pulled into LanguageRuntime because of
Breakpoint Preconditions. If we move BreakpointPrecondition out of Breakpoint,
we can extend the LanguageRuntime plugin interface so that LanguageRuntimes
can give us a BreakpointPrecondition for exceptions.
Differential Revision: https://reviews.llvm.org/D63181
llvm-svn: 364098
Diffstat (limited to 'lldb/source/Target/ObjCLanguageRuntime.cpp')
-rw-r--r-- | lldb/source/Target/ObjCLanguageRuntime.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lldb/source/Target/ObjCLanguageRuntime.cpp b/lldb/source/Target/ObjCLanguageRuntime.cpp index 3084b70e5c2..ef059a84b19 100644 --- a/lldb/source/Target/ObjCLanguageRuntime.cpp +++ b/lldb/source/Target/ObjCLanguageRuntime.cpp @@ -375,6 +375,18 @@ bool ObjCLanguageRuntime::GetTypeBitSize(const CompilerType &compiler_type, return found; } +lldb::BreakpointPreconditionSP +ObjCLanguageRuntime::GetBreakpointExceptionPrecondition(LanguageType language, + bool throw_bp) { + if (language != eLanguageTypeObjC) + return lldb::BreakpointPreconditionSP(); + if (!throw_bp) + return lldb::BreakpointPreconditionSP(); + BreakpointPreconditionSP precondition_sp( + new ObjCLanguageRuntime::ObjCExceptionPrecondition()); + return precondition_sp; +} + // Exception breakpoint Precondition class for ObjC: void ObjCLanguageRuntime::ObjCExceptionPrecondition::AddClassName( const char *class_name) { |