Added the ability to create an objective C method for an objective C
interface in ClangASTContext. Also added two bool returning functions that indicated if an opaque clang qual type is a CXX class type, and if it is an ObjC class type. Objective C classes now will get their methods added lazily as they are encountered. The reason for this is currently, unlike C++, the DW_TAG_structure_type and owns the ivars, doesn't not also contain the member functions. This means when we parse the objective C class interface we either need to find all functions whose names start with "+[CLASS_NAME" or "-[CLASS_NAME" and add them all to the class, or when we parse each objective C function, we slowly add it to the class interface definition. Since objective C's class doesn't change internal bits according to whether it has certain types of member functions (like C++ does if it has virtual functions, or if it has user ctors/dtors), I currently chose to lazily populate the class when each functions is parsed. Another issue we run into with ObjC method declarations is the "self" and "_cmd" implicit args are not marked as artificial in the DWARF (DW_AT_artifical), so we currently have to look for the parameters by name if we are trying to omit artificial function args if the language of the compile unit is ObjC or ObjC++. llvm-svn: 114722
Showing
- lldb/include/lldb/Symbol/ClangASTContext.h 48 additions, 15 deletionslldb/include/lldb/Symbol/ClangASTContext.h
- lldb/lldb.xcodeproj/project.pbxproj 1 addition, 0 deletionslldb/lldb.xcodeproj/project.pbxproj
- lldb/source/Expression/ClangExpressionDeclMap.cpp 12 additions, 6 deletionslldb/source/Expression/ClangExpressionDeclMap.cpp
- lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp 132 additions, 165 deletionslldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
- lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h 12 additions, 12 deletionslldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
- lldb/source/Symbol/ClangASTContext.cpp 194 additions, 36 deletionslldb/source/Symbol/ClangASTContext.cpp
Loading
Please register or sign in to comment