diff options
author | Greg Clayton <gclayton@apple.com> | 2010-09-24 05:15:53 +0000 |
---|---|---|
committer | Greg Clayton <gclayton@apple.com> | 2010-09-24 05:15:53 +0000 |
commit | 0fffff581665b768d100eece196e59b00eb16e7e (patch) | |
tree | a1f051d5256dbdba61d94d2502c8808f29e51b2c /llvm/utils/unittest/UnitTestMain/TestMain.cpp | |
parent | 45c42ec2f174e2c707fda2553cdabdbf57d624dc (diff) | |
download | llvm-0fffff581665b768d100eece196e59b00eb16e7e.zip llvm-0fffff581665b768d100eece196e59b00eb16e7e.tar.gz llvm-0fffff581665b768d100eece196e59b00eb16e7e.tar.bz2 |
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
Diffstat (limited to 'llvm/utils/unittest/UnitTestMain/TestMain.cpp')
0 files changed, 0 insertions, 0 deletions