diff options
| author | Raphael Isemann <teemperor@gmail.com> | 2019-12-17 09:48:54 +0100 |
|---|---|---|
| committer | Raphael Isemann <teemperor@gmail.com> | 2019-12-17 10:28:40 +0100 |
| commit | d5b54bbfaf19a8527ebf70fbf23cb8d2937f15ef (patch) | |
| tree | d5134d7708b01d1d60c2265c607d8ae1ed2a280b /lldb/source/Plugins/SymbolFile | |
| parent | 531c1161b9758aa7eae1a4dd8ecf11fdf4417b29 (diff) | |
| download | bcm5719-llvm-d5b54bbfaf19a8527ebf70fbf23cb8d2937f15ef.tar.gz bcm5719-llvm-d5b54bbfaf19a8527ebf70fbf23cb8d2937f15ef.zip | |
[lldb] Add support for calling objc_direct methods from LLDB's expression evaluator.
Summary:
D69991 introduced `__attribute__((objc_direct))` that allows directly calling methods without message passing.
This patch adds support for calling methods with this attribute to LLDB's expression evaluator.
The patch can be summarised in that LLDB just adds the same attribute to our module AST when we find a
method with `__attribute__((objc_direct))` in our debug information.
Reviewers: aprantl, shafik
Reviewed By: shafik
Subscribers: JDevlieghere, lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D71196
Diffstat (limited to 'lldb/source/Plugins/SymbolFile')
| -rw-r--r-- | lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp | 7 | ||||
| -rw-r--r-- | lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.h | 1 |
2 files changed, 7 insertions, 1 deletions
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp index 0e16153a238..bd97c68bff7 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp @@ -390,6 +390,10 @@ ParsedDWARFTypeAttributes::ParsedDWARFTypeAttributes(const DWARFDIE &die) { is_complete_objc_class = form_value.Signed(); break; + case DW_AT_APPLE_objc_direct: + is_objc_direct_call = true; + break; + case DW_AT_APPLE_runtime_class: class_language = (LanguageType)form_value.Signed(); break; @@ -958,7 +962,8 @@ TypeSP DWARFASTParserClang::ParseSubroutine(const DWARFDIE &die, clang::ObjCMethodDecl *objc_method_decl = m_ast.AddMethodToObjCObjectType( class_opaque_type, attrs.name.GetCString(), clang_type, - attrs.accessibility, attrs.is_artificial, is_variadic); + attrs.accessibility, attrs.is_artificial, is_variadic, + attrs.is_objc_direct_call); type_handled = objc_method_decl != NULL; if (type_handled) { LinkDeclContextToDIE(objc_method_decl, die); diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.h b/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.h index c5b630e435e..4ad757247c3 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.h +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.h @@ -244,6 +244,7 @@ struct ParsedDWARFTypeAttributes { bool is_scoped_enum = false; bool is_vector = false; bool is_virtual = false; + bool is_objc_direct_call = false; bool exports_symbols = false; clang::StorageClass storage = clang::SC_None; const char *mangled_name = nullptr; |

