mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-14 14:24:05 +00:00
Introduce support to encode Objective-C property information in debugging information generated for an interface.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129624 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -969,5 +969,36 @@ DIE *CompileUnit::createMemberDIE(DIDerivedType DT) {
|
||||
if (DT.isVirtual())
|
||||
addUInt(MemberDie, dwarf::DW_AT_virtuality, dwarf::DW_FORM_flag,
|
||||
dwarf::DW_VIRTUALITY_virtual);
|
||||
|
||||
// Objective-C properties.
|
||||
StringRef PropertyName = DT.getObjCPropertyName();
|
||||
if (!PropertyName.empty()) {
|
||||
addString(MemberDie, dwarf::DW_AT_APPLE_property_name, dwarf::DW_FORM_string,
|
||||
PropertyName);
|
||||
StringRef GetterName = DT.getObjCPropertyGetterName();
|
||||
if (!GetterName.empty())
|
||||
addString(MemberDie, dwarf::DW_AT_APPLE_property_getter,
|
||||
dwarf::DW_FORM_string, GetterName);
|
||||
StringRef SetterName = DT.getObjCPropertySetterName();
|
||||
if (!SetterName.empty())
|
||||
addString(MemberDie, dwarf::DW_AT_APPLE_property_setter,
|
||||
dwarf::DW_FORM_string, SetterName);
|
||||
unsigned PropertyAttributes = 0;
|
||||
if (DT.isReadOnlyObjCProperty())
|
||||
PropertyAttributes |= dwarf::DW_APPLE_PROPERTY_readonly;
|
||||
if (DT.isReadWriteObjCProperty())
|
||||
PropertyAttributes |= dwarf::DW_APPLE_PROPERTY_readwrite;
|
||||
if (DT.isAssignObjCProperty())
|
||||
PropertyAttributes |= dwarf::DW_APPLE_PROPERTY_assign;
|
||||
if (DT.isRetainObjCProperty())
|
||||
PropertyAttributes |= dwarf::DW_APPLE_PROPERTY_retain;
|
||||
if (DT.isCopyObjCProperty())
|
||||
PropertyAttributes |= dwarf::DW_APPLE_PROPERTY_copy;
|
||||
if (DT.isNonAtomicObjCProperty())
|
||||
PropertyAttributes |= dwarf::DW_APPLE_PROPERTY_nonatomic;
|
||||
if (PropertyAttributes)
|
||||
addUInt(MemberDie, dwarf::DW_AT_APPLE_property_attribute, 0,
|
||||
PropertyAttributes);
|
||||
}
|
||||
return MemberDie;
|
||||
}
|
||||
|
Reference in New Issue
Block a user