mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-19 18:24:00 +00:00
Let Objective-C front-end identify class extension, in dwarf output, using an attribute DW_AT_APPLE_objc_class_extension.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131238 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -57,7 +57,8 @@ namespace llvm {
|
|||||||
FlagVirtual = 1 << 5,
|
FlagVirtual = 1 << 5,
|
||||||
FlagArtificial = 1 << 6,
|
FlagArtificial = 1 << 6,
|
||||||
FlagExplicit = 1 << 7,
|
FlagExplicit = 1 << 7,
|
||||||
FlagPrototyped = 1 << 8
|
FlagPrototyped = 1 << 8,
|
||||||
|
FlagObjcClassExtension = 1 << 9
|
||||||
};
|
};
|
||||||
protected:
|
protected:
|
||||||
const MDNode *DbgNode;
|
const MDNode *DbgNode;
|
||||||
@ -271,6 +272,9 @@ namespace llvm {
|
|||||||
bool isArtificial() const {
|
bool isArtificial() const {
|
||||||
return (getFlags() & FlagArtificial) != 0;
|
return (getFlags() & FlagArtificial) != 0;
|
||||||
}
|
}
|
||||||
|
bool isObjcClassExtension() const {
|
||||||
|
return (getFlags() & FlagObjcClassExtension) != 0;
|
||||||
|
}
|
||||||
bool isValid() const {
|
bool isValid() const {
|
||||||
return DbgNode && (isBasicType() || isDerivedType() || isCompositeType());
|
return DbgNode && (isBasicType() || isDerivedType() || isCompositeType());
|
||||||
}
|
}
|
||||||
|
@ -235,6 +235,7 @@ enum dwarf_constants {
|
|||||||
DW_AT_APPLE_property_getter = 0x3fe9,
|
DW_AT_APPLE_property_getter = 0x3fe9,
|
||||||
DW_AT_APPLE_property_setter = 0x3fea,
|
DW_AT_APPLE_property_setter = 0x3fea,
|
||||||
DW_AT_APPLE_property_attribute = 0x3feb,
|
DW_AT_APPLE_property_attribute = 0x3feb,
|
||||||
|
DW_AT_APPLE_objc_class_extension = 0x3fec,
|
||||||
|
|
||||||
// Attribute form encodings
|
// Attribute form encodings
|
||||||
DW_FORM_addr = 0x01,
|
DW_FORM_addr = 0x01,
|
||||||
|
@ -766,6 +766,10 @@ void CompileUnit::constructTypeDIE(DIE &Buffer, DICompositeType CTy) {
|
|||||||
addToContextOwner(&Buffer, Context);
|
addToContextOwner(&Buffer, Context);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (CTy.isObjcClassExtension())
|
||||||
|
addUInt(&Buffer, dwarf::DW_AT_APPLE_objc_class_extension,
|
||||||
|
dwarf::DW_FORM_flag, 1);
|
||||||
|
|
||||||
if (Tag == dwarf::DW_TAG_class_type)
|
if (Tag == dwarf::DW_TAG_class_type)
|
||||||
addTemplateParams(Buffer, CTy.getTemplateParams());
|
addTemplateParams(Buffer, CTy.getTemplateParams());
|
||||||
|
|
||||||
|
@ -207,6 +207,7 @@ const char *llvm::dwarf::AttributeString(unsigned Attribute) {
|
|||||||
case DW_AT_APPLE_property_getter: return "DW_AT_APPLE_property_getter";
|
case DW_AT_APPLE_property_getter: return "DW_AT_APPLE_property_getter";
|
||||||
case DW_AT_APPLE_property_setter: return "DW_AT_APPLE_property_setter";
|
case DW_AT_APPLE_property_setter: return "DW_AT_APPLE_property_setter";
|
||||||
case DW_AT_APPLE_property_attribute: return "DW_AT_APPLE_property_attribute";
|
case DW_AT_APPLE_property_attribute: return "DW_AT_APPLE_property_attribute";
|
||||||
|
case DW_AT_APPLE_objc_class_extension: return "DW_AT_APPLE_objc_class_extension";
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user