mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-03 14:21:30 +00:00
Introduce DIObjCProperty. This will be used to encode objective-c property.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149732 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -42,6 +42,7 @@ namespace llvm {
|
||||
class DISubprogram;
|
||||
class DITemplateTypeParameter;
|
||||
class DITemplateValueParameter;
|
||||
class DIObjCProperty;
|
||||
|
||||
class DIBuilder {
|
||||
private:
|
||||
@@ -190,6 +191,16 @@ namespace llvm {
|
||||
StringRef PropertySetterName = StringRef(),
|
||||
unsigned PropertyAttributes = 0);
|
||||
|
||||
/// createObjCProperty - Create debugging information entry for Objective-C
|
||||
/// property.
|
||||
/// @param Name Property name.
|
||||
/// @param GetterName Name of the Objective C property getter selector.
|
||||
/// @param SetterName Name of the Objective C property setter selector.
|
||||
/// @param PropertyAttributes Objective C property attributes.
|
||||
DIObjCProperty createObjCProperty(StringRef Name, StringRef GetterName,
|
||||
StringRef SetterName,
|
||||
unsigned PropertyAttributes);
|
||||
|
||||
/// createClassType - Create debugging information entry for a class.
|
||||
/// @param Scope Scope in which this class is defined.
|
||||
/// @param Name class name.
|
||||
|
||||
@@ -128,6 +128,7 @@ namespace llvm {
|
||||
bool isUnspecifiedParameter() const;
|
||||
bool isTemplateTypeParameter() const;
|
||||
bool isTemplateValueParameter() const;
|
||||
bool isObjCProperty() const;
|
||||
};
|
||||
|
||||
/// DISubrange - This is used to represent ranges, for array bounds.
|
||||
@@ -769,6 +770,46 @@ namespace llvm {
|
||||
bool Verify() const;
|
||||
};
|
||||
|
||||
class DIObjCProperty : public DIDescriptor {
|
||||
public:
|
||||
explicit DIObjCProperty(const MDNode *N) : DIDescriptor(N) { }
|
||||
|
||||
StringRef getObjCPropertyName() const { return getStringField(1); }
|
||||
StringRef getObjCPropertyGetterName() const {
|
||||
return getStringField(2);
|
||||
}
|
||||
StringRef getObjCPropertySetterName() const {
|
||||
return getStringField(3);
|
||||
}
|
||||
bool isReadOnlyObjCProperty() {
|
||||
return (getUnsignedField(4) & dwarf::DW_APPLE_PROPERTY_readonly) != 0;
|
||||
}
|
||||
bool isReadWriteObjCProperty() {
|
||||
return (getUnsignedField(4) & dwarf::DW_APPLE_PROPERTY_readwrite) != 0;
|
||||
}
|
||||
bool isAssignObjCProperty() {
|
||||
return (getUnsignedField(4) & dwarf::DW_APPLE_PROPERTY_assign) != 0;
|
||||
}
|
||||
bool isRetainObjCProperty() {
|
||||
return (getUnsignedField(4) & dwarf::DW_APPLE_PROPERTY_retain) != 0;
|
||||
}
|
||||
bool isCopyObjCProperty() {
|
||||
return (getUnsignedField(4) & dwarf::DW_APPLE_PROPERTY_copy) != 0;
|
||||
}
|
||||
bool isNonAtomicObjCProperty() {
|
||||
return (getUnsignedField(4) & dwarf::DW_APPLE_PROPERTY_nonatomic) != 0;
|
||||
}
|
||||
|
||||
/// Verify - Verify that a derived type descriptor is well formed.
|
||||
bool Verify() const;
|
||||
|
||||
/// print - print derived type.
|
||||
void print(raw_ostream &OS) const;
|
||||
|
||||
/// dump - print derived type to dbgs() with a newline.
|
||||
void dump() const;
|
||||
};
|
||||
|
||||
/// getDISubprogram - Find subprogram that is enclosing this scope.
|
||||
DISubprogram getDISubprogram(const MDNode *Scope);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user